Turn screen update off; then back on during macro

D

Dan

I'm new to Excel VBA and struggling with syntax.

I have a macro tied to a form command button. I'd like to:

1. Turn the Excel screen update(s) off;
2. Run the code on the button;
3. Turn the Excell screen updates back on.

Is there a method/class/whatever to do this? The macro adds data to a
couple of worksheets; I'd like the macro to run without showing the user
what's going on.

Thanks! in advance.

--Dan
 
J

John

Hi Dan
Put this at the beginning of your macro:
Application.ScreenUpdating = False
This one before End Sub
Application.ScreenUpdating = True
HTH
John
 
D

Dan

:) Thanks!

John said:
Hi Dan
Put this at the beginning of your macro:
Application.ScreenUpdating = False
This one before End Sub
Application.ScreenUpdating = True
HTH
John


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top