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?
VulpesPosted Mar 30, 2013, 5:02 PM
VulpesPosted Apr 1, 2013, 9:07 AM
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.
richard smithPosted Mar 31, 2013, 11:40 AM
if (CellsBlank == true)
{
//run the code for when cells are blank
}
else
//run the code for when cells are NOT blank
}
Is that correct?