A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Code wont work "Visible=xlSheetVeryHidden"



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2004, 07:02 PM
Jonsson
external usenet poster
 
Posts: n/a
Default Code wont work "Visible=xlSheetVeryHidden"

Hi,

I have record this code to get certain sheets hidden. The WB contains a
lot of sheets and I only want to hide some of them.

The code works great as long I dont change it to "xlSheetVeryHidden"

The error appears when reaching "ActiveWindow.SelectedSheets.Visible =
xlSheetVeryHidden

Whats wrong, and is it possible to write code thats not so ugly as this
one?

Any help is appreciated

//Thomas

Sub Hide ()

Sheets("V25").Select
ActiveWindow.ScrollWorkbookTabs Sheets:=25
Sheets(Array("V25", "V26", "V27", "V28", "V29", "V30", "V31", "V32",
"V33", "V34", "V35", _
"V36", "V37", "V38", "V39", "V40", "V41", "V42", "V43", "V44", "V45",
"V46", "V47", "V48", _
"V49")).Select
Sheets("V25").Activate
ActiveWindow.SelectedSheets.Visible = xlSheetVeryHidden

Sheets("V25U").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets(Array("V25U", "V26U", "V27U", "V28U", "V29U", "V30U", "V31U",
"V32U", "V33U", _
"V34U", "V35U", "V36U", "V37U", "V38U", "V39U", "V40U", "V41U", "V42U",
"V43U", "V44U", _
"V45U", "V46U", "V47U", "V48U", "V49U")).Select
Sheets("V25U").Activate
Sheets(Array("V50U", "V51U", "V52U", "V53U")).Select Replace:=False
ActiveWindow.SelectedSheets.Visible = xlSheetVeryHidden
End Sub


---
Message posted from http://www.ExcelForum.com/

  #2  
Old June 14th, 2004, 07:13 PM
Ken Macksey
external usenet poster
 
Posts: n/a
Default Code wont work "Visible=xlSheetVeryHidden"

Hi

Try something like


WorkSheets("sheet2").Visible = xlVeryHidden


HTH

Ken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004


  #3  
Old June 14th, 2004, 07:18 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Code wont work "Visible=xlSheetVeryHidden"

Hi
see your existing post

--
Regards
Frank Kabel
Frankfurt, Germany


Hi,

I have record this code to get certain sheets hidden. The WB contains
a lot of sheets and I only want to hide some of them.

The code works great as long I dont change it to "xlSheetVeryHidden"

The error appears when reaching "ActiveWindow.SelectedSheets.Visible

=
xlSheetVeryHidden

Whats wrong, and is it possible to write code thats not so ugly as
this one?

Any help is appreciated

//Thomas

Sub Hide ()

Sheets("V25").Select
ActiveWindow.ScrollWorkbookTabs Sheets:=25
Sheets(Array("V25", "V26", "V27", "V28", "V29", "V30", "V31", "V32",
"V33", "V34", "V35", _
"V36", "V37", "V38", "V39", "V40", "V41", "V42", "V43", "V44", "V45",
"V46", "V47", "V48", _
"V49")).Select
Sheets("V25").Activate
ActiveWindow.SelectedSheets.Visible = xlSheetVeryHidden

Sheets("V25U").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets(Array("V25U", "V26U", "V27U", "V28U", "V29U", "V30U", "V31U",
"V32U", "V33U", _
"V34U", "V35U", "V36U", "V37U", "V38U", "V39U", "V40U", "V41U",
"V42U", "V43U", "V44U", _
"V45U", "V46U", "V47U", "V48U", "V49U")).Select
Sheets("V25U").Activate
Sheets(Array("V50U", "V51U", "V52U", "V53U")).Select Replace:=False
ActiveWindow.SelectedSheets.Visible = xlSheetVeryHidden
End Sub


---
Message posted from http://www.ExcelForum.com/


  #4  
Old June 15th, 2004, 02:12 AM
Dave Peterson
external usenet poster
 
Posts: n/a
Default Code wont work "Visible=xlSheetVeryHidden"

You have more responses at your original post.

"Jonsson " wrote:

Hi,

I have record this code to get certain sheets hidden. The WB contains a
lot of sheets and I only want to hide some of them.

The code works great as long I dont change it to "xlSheetVeryHidden"

The error appears when reaching "ActiveWindow.SelectedSheets.Visible =
xlSheetVeryHidden

Whats wrong, and is it possible to write code thats not so ugly as this
one?

Any help is appreciated

//Thomas

Sub Hide ()

Sheets("V25").Select
ActiveWindow.ScrollWorkbookTabs Sheets:=25
Sheets(Array("V25", "V26", "V27", "V28", "V29", "V30", "V31", "V32",
"V33", "V34", "V35", _
"V36", "V37", "V38", "V39", "V40", "V41", "V42", "V43", "V44", "V45",
"V46", "V47", "V48", _
"V49")).Select
Sheets("V25").Activate
ActiveWindow.SelectedSheets.Visible = xlSheetVeryHidden

Sheets("V25U").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets(Array("V25U", "V26U", "V27U", "V28U", "V29U", "V30U", "V31U",
"V32U", "V33U", _
"V34U", "V35U", "V36U", "V37U", "V38U", "V39U", "V40U", "V41U", "V42U",
"V43U", "V44U", _
"V45U", "V46U", "V47U", "V48U", "V49U")).Select
Sheets("V25U").Activate
Sheets(Array("V50U", "V51U", "V52U", "V53U")).Select Replace:=False
ActiveWindow.SelectedSheets.Visible = xlSheetVeryHidden
End Sub

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.