View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LarryLev[_2_] LarryLev[_2_] is offline
external usenet poster
 
Posts: 6
Default set worksheet name to a variable ...

I must be out of practice because this has got to be very simple and I
just can't figure it out... or it is because I do not have access to my
books ... but, how do you do:

dim sheetName as Worksheet
sheetName = ActiveWorksheet.Name

If sheetName = name_of_first_sheet THEN
do a bunch of stuff
elseif
sheetName = Name_of_second_sheet THEN
do a bunch of other stuff
endif