Range Name in VB

N

Nick

Hello,

Wondering how you write a macro in Visual Basic ("VB") so
that the macro refers to a range name and not a cell
reference. If you insert cells after you have written the
macro where you have a cell reference, it no longer
works. Using a range name would fix this.

EG...
If Target.Address = ("$I$108") Then
If Range("$I$108") < Range("$I$81") Then
MsgBox "XXX should have a minimum of the level"
Range("$I$108").Select
End If
End If

Instead of Cell reference I108, what would you write for a
range name?

Cheers
Nick
 

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

Top