3
Answers

Check if Cells A2 and A3 are blank in Excel

richard smith

richard smith

11y
4.4k
1
I tried this code:

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?
Answers (3)
Next Recommended Forum