ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What to use other than .Select (https://www.excelbanter.com/excel-programming/295149-what-use-other-than-select.html)

miker1999[_11_]

What to use other than .Select
 
Hello,
I have some code that runs on Workbook Open that goes to a few sheet
and turns on Freeze Frames and Hides some columns. The way I currentl
have it coded...works, but it quickly flashes through the sheets. I
there a different way to code this so it doesn't flash through th
sheets?

Here is a sample of the code. Help!


Private Sub Workbook_Open()
Worksheets("1-OPEN").Select
Call Freeze_Frames
Call HideColumns_All
Worksheets("COMPLETED").Select
Call Freeze_Frames
Call HideColumns_Al

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


Dave Peterson[_3_]

What to use other than .Select
 
You can hide a lot of the flashing by adding:

application.screenupdating = false
'your code
application.screenupdating = true



"miker1999 <" wrote:

Hello,
I have some code that runs on Workbook Open that goes to a few sheets
and turns on Freeze Frames and Hides some columns. The way I currently
have it coded...works, but it quickly flashes through the sheets. Is
there a different way to code this so it doesn't flash through the
sheets?

Here is a sample of the code. Help!

Private Sub Workbook_Open()
Worksheets("1-OPEN").Select
Call Freeze_Frames
Call HideColumns_All
Worksheets("COMPLETED").Select
Call Freeze_Frames
Call HideColumns_All

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


--

Dave Peterson


Tushar Mehta

What to use other than .Select
 
One way would be to add a Application.ScreenUpdating=False at the
beginning of your code and a =True at the end. A more efficient way
would be to avoid unnecessary selects and activates. See the
Excel/VBA/Beyond Excel's recorder page of my web site.
--
Regards,

Tushar Mehta
www.tushar-mehta.com
Business solutions leveraging technology
Microsoft Most Valuable Professional (MVP) 2000-2004

In article , miker1999
says...
Hello,
I have some code that runs on Workbook Open that goes to a few sheets
and turns on Freeze Frames and Hides some columns. The way I currently
have it coded...works, but it quickly flashes through the sheets. Is
there a different way to code this so it doesn't flash through the
sheets?

Here is a sample of the code. Help!


Private Sub Workbook_Open()
Worksheets("1-OPEN").Select
Call Freeze_Frames
Call HideColumns_All
Worksheets("COMPLETED").Select
Call Freeze_Frames
Call HideColumns_All


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




All times are GMT +1. The time now is 06:25 AM.

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