Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Correct syntax for hiding a chart sheet

What is the correct syntax in a macro for hiding a chart sheet?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Correct syntax for hiding a chart sheet

Brad,

One way: to hide a chart sheet named Chart1

Sheets("Chart1").visible=xlSheetHidden


--
Hope that helps.

Vergel Adriano


"Brad" wrote:

What is the correct syntax in a macro for hiding a chart sheet?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Correct syntax for hiding a chart sheet

Sheets("chart5").Visible = False

gives me a subscript out of range runtime error 9

"Vergel Adriano" wrote:

Brad,

One way: to hide a chart sheet named Chart1

Sheets("Chart1").visible=xlSheetHidden


--
Hope that helps.

Vergel Adriano


"Brad" wrote:

What is the correct syntax in a macro for hiding a chart sheet?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Correct syntax for hiding a chart sheet

Check your chart sheet title - are there any additional spaces (e.g.,
"Chart 5", "Chart 5 ")?

You could (and in most cases, *should*) use the CodeName:

Chart1.Visible = xlSheetHidden



In article ,
Brad wrote:

Sheets("chart5").Visible = False

gives me a subscript out of range runtime error 9

"Vergel Adriano" wrote:

Brad,

One way: to hide a chart sheet named Chart1

Sheets("Chart1").visible=xlSheetHidden

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
Correct Syntax TeeSee Excel Discussion (Misc queries) 6 February 28th 08 01:36 AM
CORRECT SYNTAX FOR RUN... [email protected] Excel Programming 3 August 18th 06 09:29 PM
Correct Syntax Ronbo Excel Programming 2 February 21st 06 01:57 PM
If...and... - can never get the syntax correct! Darin Kramer Excel Programming 12 March 24th 05 04:18 PM
Can't get this syntax correct, please help. Sharlene England Excel Programming 4 December 1st 03 05:41 PM


All times are GMT +1. The time now is 11:35 AM.

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"