Runs possible on the background?

A

aiyer

Hello!

I wrote a macro, which copies data from a worksheet and pastes it o
another, in the same workbook. It then manipulates the data and write
them to a file in the text format.
Logic and things run just fine, just that when the data are bein
manipulated by macro, in the worksheet, it is also displayed (at a ver
high speed) and the user doesn’t necessarily have to see them gettin
manipulated and run by Excel.

So is there a way, we can blind these? I.e., is there a way, we ca
have these runs in the background, while displaying a message ‘Resul
file generated!’ to the user?

I would appreciate any tips.
Thanks in advance guys.

Arun…
Vtec Corp
 
C

Chip Pearson

You can't run a macro in the background, such that the user can
work in Excel while the macro is running. Whenever VBA is
executing, no user actions may be performed. You can hide the
actions of your macros by turning the ScreenUpdating property to
False, running the code, and restoring the property to True.
E.g.,


Application.ScreenUpdating = False
' your code here
Application.ScreenUpdating = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
R

Rod Jones

DoEvents Function

"Yields execution so that the operating system can process
other events."
Place it inside the macro that is running. Trail and
error..well...it worked for me anyway.

Look it up in VBA object browser
 
Top