Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I run a VBA application in the background?

Status
Not open for further replies.

elubrun

Programmer
Sep 24, 2001
1
NL
I've made an application that takes quite some time to run. I would like to test if removing the screen-info (like refreshing, scrolling through enormous excel files, switching between worksheets, etc.) will speed up the whole process, but I do not know how/if this is possible? So, is there an option to run the whole application in the background, except for the running userform?

Thanks for any info.
 
try putting at the top of the code

Application.screenupdating = false

see if that helps
 
'*********************************************************************************************
Elubrun,

why your code swiches between worksheets, or selects workbooks, cells?

you could refer them without activate them (if the active workbook/sheet is Book1/Sheet1):

MsgBox Worksheets("Sheet2").Range("A1").Value
MsgBox Worksheets("Sheet2").Range("A1").Offset(1, 0).Value
MsgBox Workbooks("Book2").Worksheets("Sheet2").Range("A1").Offset(0, 3).Value
for i=0 to 30
MsgBox Worksheets("Sheet2").Range("A1").Offset(i, 0).Value
next i

If I misunderstood your problem, pls insert your code here
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top