Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem activating a sheet
Hi,
I want to activate a sheet in Run time. Can anyone explain to me wh of the following two bits of code, the first one work but the secon doesn't. Set monthSheet = baseBook.Sheets("Month") monthSheet.Activate Set currSheet = baseBook.Sheets(sheet) currSheet.Activate - error message "Out of Range" Cheers, J -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem activating a sheet
Because you haven't enclosed sheet in quotes, so it is looking for a
variable called sheet, which is probably empty? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "jowatkins " wrote in message ... Hi, I want to activate a sheet in Run time. Can anyone explain to me why of the following two bits of code, the first one work but the second doesn't. Set monthSheet = baseBook.Sheets("Month") monthSheet.Activate Set currSheet = baseBook.Sheets(sheet) currSheet.Activate - error message "Out of Range" Cheers, Jo --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conflicts with autorefresh in pivot table activating sheet protect | Excel Discussion (Misc queries) | |||
Problem pasting a row from a hidden sheet to the first free row on another visible sheet | Excel Programming | |||
Can I sort without activating / selecting sheet? | Excel Programming | |||
Problem in activating a sheet | Excel Programming | |||
Selecting/Activating Control Tools Combobox on Sheet | Excel Programming |