Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
In other programming environments, you can speed things up by not performing formating and calculations "live". For instance, if I run the following script: Columns("U:U").Select Selection.Clear Range("T1").Select Columns("V:V").Select Selection.Clear Range("T1").Select Columns("W:W").Select Selection.Clear Columns("T:X").Select Selection.NumberFormat = "$#,##0.00" ' Make Currencey format Range("U1").Select ' Select a signal cell to avoid confusion when a form button is pressed, the page flashes, etc. while it does the changes. In Excel, should the screen be "locked" and then "unlocked" before and after the script? If so, how can this be done? Thanks for any suggestions! Ben |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.ScreenUpdating = False
'your code Application.ScreenUpdating = True But........doing away with all those extraneous "selects" would be better. Sub dothings() Columns("U:W").Clear Columns("T:X").NumberFormat = "$#,##0.00" Range("U1").Select End Sub Gord Dibben MS Excel MVP On Thu, 11 Dec 2008 13:54:04 -0800, Ben in CA wrote: Hi, In other programming environments, you can speed things up by not performing formating and calculations "live". For instance, if I run the following script: Columns("U:U").Select Selection.Clear Range("T1").Select Columns("V:V").Select Selection.Clear Range("T1").Select Columns("W:W").Select Selection.Clear Columns("T:X").Select Selection.NumberFormat = "$#,##0.00" ' Make Currencey format Range("U1").Select ' Select a signal cell to avoid confusion when a form button is pressed, the page flashes, etc. while it does the changes. In Excel, should the screen be "locked" and then "unlocked" before and after the script? If so, how can this be done? Thanks for any suggestions! Ben |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Gord - Works great, and that's a good suggestion about the
consolidation. (As you can tell, I'm rather new at this!) Ben "Gord Dibben" wrote: Application.ScreenUpdating = False 'your code Application.ScreenUpdating = True But........doing away with all those extraneous "selects" would be better. Sub dothings() Columns("U:W").Clear Columns("T:X").NumberFormat = "$#,##0.00" Range("U1").Select End Sub Gord Dibben MS Excel MVP On Thu, 11 Dec 2008 13:54:04 -0800, Ben in CA wrote: Hi, In other programming environments, you can speed things up by not performing formating and calculations "live". For instance, if I run the following script: Columns("U:U").Select Selection.Clear Range("T1").Select Columns("V:V").Select Selection.Clear Range("T1").Select Columns("W:W").Select Selection.Clear Columns("T:X").Select Selection.NumberFormat = "$#,##0.00" ' Make Currencey format Range("U1").Select ' Select a signal cell to avoid confusion when a form button is pressed, the page flashes, etc. while it does the changes. In Excel, should the screen be "locked" and then "unlocked" before and after the script? If so, how can this be done? Thanks for any suggestions! Ben |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
stop view and lock columns | Excel Worksheet Functions | |||
Password to Lock out VBA from View | Excel Programming | |||
hide tabs from view then lock tabs? | Excel Discussion (Misc queries) | |||
Lock Screen to current view | Excel Programming | |||
How to lock the view of certain number of rows | Excel Programming |