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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel repaint issue

Status
Not open for further replies.

maswien

Technical User
Sep 24, 2003
1,286
CA

I wrote a user form in excel, click a buton to run a query and then write the resultset to the sheet, then the form turns to be a blank for a while, can anybody tell me how to solve this problem?
 
Your query may be slow. . . you could at least keep the screen from going blank by putting:
Code:
Application.ScreenUpdating = False
at the beginning of your code, and:
Code:
Application.ScreenUpdating = True
at the end of it. That way nothing would change until the code was finished running. . .

VBAjedi [swords]
 

thanks jedi,

I solved the problem by adding some doevents.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top