Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thisworkbook.Activate
for each wks in ThisWorkbook.worksheets wks.Select Next the wks can not be selected if the ThisWorkbook is not the activeworkbook. -- Regards, Tom Ogilvy "Ron de Bruin" wrote in message ... For Each wks In Worksheets This is the same as For Each wks In ActiveWorkbook.Worksheets Thisworkbook will use the sheets in the workbook where the code is in. -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "scott" wrote in message ... I think it is working with: For Each wks In Worksheets wks.Select Thanks for you help. scott wrote: No. I have tried running it in different workbooks, but I get the same error. Ron de Bruin wrote: Hi Scott Do you have hidden worksheets in the workbook?? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop thru files in DIR, delete worksheets & reset worksheet Name property?? | Excel Programming | |||
Loop thru multiple files - Modify worksheet visible property | Excel Programming | |||
Excel macro to loop through worksheets and graph data from each worksheet | Excel Programming | |||
How? Macro to copy range to new worksheet, name new worksheet, loop | Excel Programming | |||
If... Then Loop problems in Worksheet Event | Excel Programming |