IsNull and a named range

  • Thread starter Thread starter bluegrassstateworker
  • Start date Start date
B

bluegrassstateworker

I have a one-cell-named range called REQT and if there is a value
inserted, I want to go to a worksheet called RFP. The variable
BeenThereAlready ensures this happens only once. I made this one cell
a named range so that any modifications referring a specific cell would
not require a change in code. What I have below is not working and the
solution is simple but I have hit a wall. Any suggestions appreciated.

Private Sub Worksheet_Change(ByVal Target As Range)
If IsNull((Range("REQT").Value)) = False And BeenThereAlready =
False Then
Sheets("RFP").Activate
Sheets("RFP").Range("A1").Select
BeenThereAlready = True
End If
If IsNull((Range("REQT").Value)) = True And BeenThereAlready = True
Then
BeenThereAlready = False
End If
End Sub
 
I think I'd drop the IsNull check and either use:

if isempty(me.range("reqt").value) ...
or
if me.range("reqt").value = "" ....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top