If...then
Probably better off with a select case statement something like this...
select case range("Location").value
case "Here"
sheets("Here").select
Range("A1").select
case "There"
sheets("There").select
Range("C10").select
case "EveryWhere"
sheets("EveryWhere").select
Range("D15").select
case else
msgbox "No such place"
End Select
--
HTH...
Jim Thomlinson
"David R. Duggan" wrote:
I want to use the value in a named range to determine the action to take
when clicking on a command button.
The spreadsheet has range called "Location" based on a the location (city)
of the sales rep. When clicking on a command button, how can the button
direct the individual based on this value?
Something like:??
If Range("Location").Value = "Loc1" then
do this
Else
do this
End If
DRD
|