Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Robert
 
Posts: n/a
Default Can a macro format a hidden sheet?

I have an open sheet, which is only open to record the macro. Then I hide
the sheet and use the keyboard shortcut to clear the hidden sheet. This
won't work. I get an error in the Sheets("report").select area. Guessing
because it can't select a sheet that it doesn't see. If I unhide the sheet,
the macro works fine. How can I make this work and still have the sheet
hidden?

Also, what's the difference between hidden and very hidden? Thanks.
  #2   Report Post  
Gary Brown
 
Posts: n/a
Default

Robert,
Refer to the hidden sheet by it's name, such as 'Sheet1'.
For example:
Sheets("Sheet1").Range("A1:A16").ClearContents

Hidden sheets can be seen from the FORMAT / SHEET / HIDE[UNHIDE] form.
Very Hidden sheets can only be seen in the Visual Basic Editor.
HTH,
Gary Brown


"Robert" wrote:

I have an open sheet, which is only open to record the macro. Then I hide
the sheet and use the keyboard shortcut to clear the hidden sheet. This
won't work. I get an error in the Sheets("report").select area. Guessing
because it can't select a sheet that it doesn't see. If I unhide the sheet,
the macro works fine. How can I make this work and still have the sheet
hidden?

Also, what's the difference between hidden and very hidden? Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format sheet data DTE Excel Worksheet Functions 4 December 23rd 04 07:47 PM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 07:11 PM
Macro, select Sheet "Number", NOT Sheet Name DAA Excel Worksheet Functions 4 November 30th 04 06:29 PM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 06:57 PM
Why can't my macro use Auto Filter when I told the Sheet Protecti. KC Rippstein Excel Worksheet Functions 1 October 28th 04 06:13 PM


All times are GMT +1. The time now is 04:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"