Thread: VBA Variable
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
newbie newbie is offline
external usenet poster
 
Posts: 137
Default VBA Variable

Hi,

I am trying to run a routine based on the value in a cell, for example A1
might contain RED, BLUE or GREEN.
In the VBA I would have

x = Range("A1") .value
goto x
end

RED:
'red routine here
end
BLUE:
'blue routine here
end
GREEN
'green routine here
end

....but it doesn't work, any help much appreciated.