With wbImportFile.Sheets(1)
.Range(Cells(iFirstRow + 464, iFirstColumn)).Select
If Not Selection.Value = "" Then
MsgBox ("This cam has an offset")
End If
End With
All, I am trying to determine if a specific cell in a file I am importing has a value in it. wbImportFile is a Workbook variable, and iFirstRow and iFirstColumn are Long variable (calculated in previous code).
I'm just trying to determine if the cell that is located at the iFirstRow + 464th row and iFirstColumn is empty, and when I do, I get an error on the second line that is runtime error 1004 "Application defined or object defined error."
I have also tried the code without the with statement:
If Not Range(Cells(iFirstRow + 464, iFirstColumn)).Value = "" Then
MsgBox ("This cam has an offset")
End If
but I get the same error.
Can anyone help me?