PC Review


Reply
Thread Tools Rate Thread

Correct syntax for hiding a chart sheet

 
 
=?Utf-8?B?QnJhZA==?=
Guest
Posts: n/a
 
      16th Apr 2007
What is the correct syntax in a macro for hiding a chart sheet?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VmVyZ2VsIEFkcmlhbm8=?=
Guest
Posts: n/a
 
      16th Apr 2007
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?

 
Reply With Quote
 
=?Utf-8?B?QnJhZA==?=
Guest
Posts: n/a
 
      16th Apr 2007
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?

 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      16th Apr 2007
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 <BBDFE6CE-6ECC-4273-951E-(E-Mail Removed)>,
Brad <(E-Mail Removed)> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct Syntax TeeSee Microsoft Excel Misc 6 28th Feb 2008 01:36 AM
Correct Syntax DS Microsoft Access Form Coding 5 7th Oct 2007 07:04 PM
Is the syntax correct? Kvin Microsoft Excel Discussion 5 14th Nov 2006 09:54 PM
If...and... - can never get the syntax correct! Darin Kramer Microsoft Excel Programming 12 24th Mar 2005 04:18 PM
Correct syntax Moe Microsoft Windows 2000 Networking 1 20th Jan 2004 07:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:29 PM.