Test a named cell in a macro
I need to test a named cell in the excel sheet to see if there is any
data in the cell.
Currently I am doing:
'Req Number
If Trim(Cells(4, 7)) = "" Then
errtest = errtest & "Please Fill in the Req Number"
End If
The problem is that the cells 4,7 may change, as new lines get added
to the sheet. So I have named it ReqNo in the sheet. Then even if new
lines are added, the test will still be on the correct field.
But I don't know how to call it.
I have tried the following:
Cells("ReqNo")
Cells('ReqNo')
Activecell.ReqNo
select.cell.ReqNo
ect, ect , ect
Does anyone know how to call a named cell in the macro?
Cheers for all help,
Caroline
|