ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Macros that don't steal focus? (https://www.excelbanter.com/excel-programming/333162-vba-macros-dont-steal-focus.html)

morpheleon

VBA Macros that don't steal focus?
 

I have written a set of sub's and functions that handle formattin
several sheets in my workbook. The problem is that in the process o
activating the sheets and making my formatting changes the windo
appears like it's going crazy. Is there a way I can turn off the focu
change before my macro runs amd then turn it back on after it's done?

Thanks,

Morp

--
morpheleo
-----------------------------------------------------------------------
morpheleon's Profile: http://www.msusenet.com/member.php?userid=282
View this thread: http://www.msusenet.com/t-187057358


K Dales[_2_]

VBA Macros that don't steal focus?
 
At the beginning of your code:
Application.ScreenUpdating = False
At the end:
Application.ScreenUpdating = True

"morpheleon" wrote:


I have written a set of sub's and functions that handle formatting
several sheets in my workbook. The problem is that in the process of
activating the sheets and making my formatting changes the window
appears like it's going crazy. Is there a way I can turn off the focus
change before my macro runs amd then turn it back on after it's done?

Thanks,

Morph


--
morpheleon
------------------------------------------------------------------------
morpheleon's Profile: http://www.msusenet.com/member.php?userid=2828
View this thread: http://www.msusenet.com/t-1870573587




All times are GMT +1. The time now is 10:04 AM.

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