Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding Sheets
Looking for some input on hiding sheets. I've got a
workbook with about 50 sheets. At any point in time, what I'd like is to have just 1 sheet visible at a time (depending what a user selects from a menu). What I've been using so far is the code below: Dim wsSheet As Worksheet For Each wsSheet In Worksheets wsSheet.Visible = wsSheet.Name = "Sheet1" Next wsSheet End Sub This works, but I'm not sure if this is the best way to achieve what I want. The thing I don't like about this method is I see my workbook hiding each sheet individually for about 5 seconds. Is there a better way to do this where I woulnd't get that? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding Sheets
If you set Application.ScreenUpdating = False before the loop and then set
it back to true after the loop you don't see the sheets hiding. Sue "Eric" wrote in message ... Looking for some input on hiding sheets. I've got a workbook with about 50 sheets. At any point in time, what I'd like is to have just 1 sheet visible at a time (depending what a user selects from a menu). What I've been using so far is the code below: Dim wsSheet As Worksheet For Each wsSheet In Worksheets wsSheet.Visible = wsSheet.Name = "Sheet1" Next wsSheet End Sub This works, but I'm not sure if this is the best way to achieve what I want. The thing I don't like about this method is I see my workbook hiding each sheet individually for about 5 seconds. Is there a better way to do this where I woulnd't get that? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding Sheets
does setting
Application.ScreenUpdating = False before the For, help? -----Original Message----- Looking for some input on hiding sheets. I've got a workbook with about 50 sheets. At any point in time, what I'd like is to have just 1 sheet visible at a time (depending what a user selects from a menu). What I've been using so far is the code below: Dim wsSheet As Worksheet For Each wsSheet In Worksheets wsSheet.Visible = wsSheet.Name = "Sheet1" Next wsSheet End Sub This works, but I'm not sure if this is the best way to achieve what I want. The thing I don't like about this method is I see my workbook hiding each sheet individually for about 5 seconds. Is there a better way to do this where I woulnd't get that? Thanks! . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hiding Sheets
Change to this.......
Sub ScreenUpdate () Dim wsSheet As Worksheet Application.ScreenUpdating = False For Each wsSheet In Worksheets wsSheet.Visible = wsSheet.Name = "Sheet1" Next wsSheet Application.ScreenUpdating = True End Sub "Eric" wrote in message ... Looking for some input on hiding sheets. I've got a workbook with about 50 sheets. At any point in time, what I'd like is to have just 1 sheet visible at a time (depending what a user selects from a menu). What I've been using so far is the code below: Dim wsSheet As Worksheet For Each wsSheet In Worksheets wsSheet.Visible = wsSheet.Name = "Sheet1" Next wsSheet End Sub This works, but I'm not sure if this is the best way to achieve what I want. The thing I don't like about this method is I see my workbook hiding each sheet individually for about 5 seconds. Is there a better way to do this where I woulnd't get that? Thanks! ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
hiding sheets | Excel Worksheet Functions | |||
hiding zero values on all sheets & by default on new sheets | Excel Worksheet Functions | |||
Hiding sheets | Excel Discussion (Misc queries) | |||
Locking Sheets / Hiding Sheets | Excel Worksheet Functions | |||
Hiding Sheets | Excel Worksheet Functions |