Doing something wrong - xlVeryHidden

K

Kevin

I'm doing something wrong with a very simple command.
When I step through the Auto_Open macro it seems to
execute fine, but the worksheet is still visible. What's
wrong with the following?

Worksheets("Graph Data").Visible = xlVeryHidden

What have I done stupid with this simple statement?

thanks in advance

kevin
 
K

Kevin

Not at all. There are more than a dozen worksheets, and
the idea behind hiding this is to keep the number of
sheets from being overwhelming.
 
D

Don Guillett

Shouldn't be anything wrong. Sometimes, if you leave excel and come back all
is well again.
 
V

Vasant Nanavati

Are you sure "Graph Data" is the correct name of the sheet, and that it is
in the active workbook? Dumb question, but it's possible you could have
leading or trailing spaces. Normally this would throw an error but not if
you have On Error Resume Next statement before that.
 
R

ross

Hi,
don'tknow why it's not working, have you tryed sticking it in the on
open event of the workbook, or even in a seprate mod, sometimes this
can "work".

Good Luck

Ross
 
T

TroyW

Kevin,

A slightly different approach would be to use the CodeName of the sheet in
your statement.

For example if "Graph Data" has a CodeName of "Sheet1" then the statement
would be:
Sheet1.Visible = xlSheetVeryHidden

Troy
 
Top