View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Russell Lucas Russell Lucas is offline
external usenet poster
 
Posts: 8
Default Visible property on Worksheets

Bob,

Thanks for your reply. The example I gave was taken from a book where I am using constance rather thana string.

The arguments are correct, but there is application or object error not allow it. What I'm looking for is a work around to stop, what appears to be some form of built in protection.

Thanks

----- Bob Phillips wrote: -----

Russell,

If you want to use text strings, you need to enclose in quotes, such as

Application.Workbooks("BOOK1").Worksheets("Sheet1" ).Visible =
xlsheetveryhidden


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Russell Lucas" wrote in message
...
Hello everyone,
Does anyone know how you can change the default "xlsheetvisible" setting

for Worksheet.visible through VBA, bearing in mind that I have tryed all of
the bellow conitations of code:-
Application.Workbooks(BOOK1).Worksheets(Sheet1).Vi sible =

xlsheetveryhidden
With Workbooks(BOOK1).Worksheets(Sheet1)

.visible = xlveryhidden
end with
I have also tryed several ways of defining the worksheet.
Can anyone help out?
Thanks