public static void CellsBlank()
{
Worksheet worksheet;
Workbook wb = Global.Variables.GlobalVariables.oXL.ActiveWorkbook;
Excel.Range cell1 = (Excel.Range)worksheet.get_Range("A2", "A2");
Excel.Range cell2 = (Excel.Range)worksheet.get_Range("A3", "A3");
}
But that throws a debug error when it hits my Excel.Range cell1 line! How should I re-write this?
}
But that throws a debug error when it hits my Excel.Range cell1 line! How should I re-write this?

VulpesRank #55 · 29.2K reputationPosted Mar 30, 2013, 1:02 PM EDT
richard smithRank #8,268 · 225 reputationPosted Mar 31, 2013, 7:40 AM EDT
if (CellsBlank == true)
{
//run the code for when cells are blank
}
else
//run the code for when cells are NOT blank
}
Is that correct?
VulpesRank #55 · 29.2K reputationPosted Apr 1, 2013, 5:07 AM EDT
if (CellsBlank())
Also, if you might want to test cells other than A2 and A3 , then you could pass them as parameters to the method.