Thread: sheet name
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
geebee geebee is offline
external usenet poster
 
Posts: 190
Default sheet name

hi,

I have the following:

For x = 1 to 30
dim previoussheet as string
previoussheet = "acct" & x-1
set sh = worksheets(previoussheet)

if not sheetexists(sh) then
....

i think there is a problem with the following line:
set sh = worksheets(previoussheet)
because the standard syntax is usually something like:
set sh = worksheets("previoussheet")

i am not sure what to do. could someone help?

thanks in advance,
geebee