Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
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
Windows Visible Property - Code Help Gerry O Excel Discussion (Misc queries) 2 September 6th 07 02:44 AM
Visible Property Steve A[_2_] Excel Programming 1 January 5th 04 12:35 PM
Run-time error '1004' - Unable to set the Visible property of the Worksheet class Shalin Chopra Excel Programming 3 November 25th 03 08:38 PM
Loop thru multiple files - Modify worksheet visible property Mike Taylor Excel Programming 1 October 24th 03 04:03 AM
.Visible Property Jollynicechap Excel Programming 1 July 8th 03 09:06 PM


All times are GMT +1. The time now is 04:44 PM.

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"