ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Making macro functions invisible? (https://www.excelbanter.com/excel-programming/312207-making-macro-functions-invisible.html)

Dan Winterton

Making macro functions invisible?
 
I am using VBA to hide and unhide certainworksheets based
on a user's input in a combobox. what is the VB function
for turning off the screen so that the user doesn't see
flashes as these worksheets hide and unhide?

Any help is greatly appreciated.
Thanks,
Dan Winterton

Harald Staff

Making macro functions invisible?
 
Application.Screenupdating = False
and True at the end.

HTH. Best wishes Harald

"Dan Winterton" skrev i melding
...
I am using VBA to hide and unhide certainworksheets based
on a user's input in a combobox. what is the VB function
for turning off the screen so that the user doesn't see
flashes as these worksheets hide and unhide?

Any help is greatly appreciated.
Thanks,
Dan Winterton




Niek Otten

Making macro functions invisible?
 
Hi Dan,

Application.Screenupdating = False

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"Dan Winterton" wrote in message
...
I am using VBA to hide and unhide certainworksheets based
on a user's input in a combobox. what is the VB function
for turning off the screen so that the user doesn't see
flashes as these worksheets hide and unhide?

Any help is greatly appreciated.
Thanks,
Dan Winterton




Norman Jones

Making macro functions invisible?
 
Hi Dan,

Application.ScreenUpdating = False

'Your Code

Application.ScreenUpddating = True

However, It is rarely necessary to make selections and making repeated sheet
selections will cause the flashing that you have observed.

---
Regards,
Norman



"Dan Winterton" wrote in message
...
I am using VBA to hide and unhide certainworksheets based
on a user's input in a combobox. what is the VB function
for turning off the screen so that the user doesn't see
flashes as these worksheets hide and unhide?

Any help is greatly appreciated.
Thanks,
Dan Winterton




Jim Thomlinson[_3_]

Making macro functions invisible?
 
application.screenupdating = false
application.screenupdating = true

Always make sure that you turn it back on at the end of the procedure. It is
also a good idea to include it in error handling code (if you have any).
Don't turn it on and off multiple times withing the same set of function
calls or the screen will flash when it is turned on.

Hope this helps...

"Dan Winterton" wrote:

I am using VBA to hide and unhide certainworksheets based
on a user's input in a combobox. what is the VB function
for turning off the screen so that the user doesn't see
flashes as these worksheets hide and unhide?

Any help is greatly appreciated.
Thanks,
Dan Winterton



All times are GMT +1. The time now is 12:25 PM.

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