ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Visible property on Worksheets (https://www.excelbanter.com/excel-programming/290345-visible-property-worksheets.html)

Russell Lucas

Visible property on Worksheets
 
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 = xlveryhidde
end wit

I have also tryed several ways of defining the worksheet

Can anyone help out

Thanks

Bob Phillips[_6_]

Visible property on Worksheets
 
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




Frank Kabel

Visible property on Worksheets
 
Hi Russel
try
Worksheets("Sheet1").Visible = xlsheetveryhidden

works for me
Frank



Russell Lucas wrote:
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




Russell Lucas

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





Tom Ogilvy

Visible property on Worksheets
 
does the workbook only have one worksheet? at least one worksheet must
remain visible.

What is the error message you get?

--
Regards,
Tom Ogilvy

"Russell Lucas" wrote in message
...
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







Russell Lucas

Visible property on Worksheets
 
Tom

The error message I recieve is a 1004 Application defined or object defined error, rather none descript. I wasn't aware you need one visible sheet in a book, this maybe my problem. I will test it an add another posting if it is unsuccessful

Thanks


All times are GMT +1. The time now is 07:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com