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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|