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

Excel VBA - Modeless UserForm Slowing Sub Performance

Status
Not open for further replies.

corycrum

Technical User
Jan 10, 2007
36
US
Hi,

I have an Excel workbook that allows a user to requery an Access databse, based on thier selection from a combo box on a UserForm.

If the UserForm's ShowModal property is set to True, the requery/update macro is blazing fast. If the UserForm's ShowModal property is set to False, the macro slows to a crawl.

Any idea as to why performance would be significantly impacted by changing the ShowModal property? Any suggestions for a fix?

Thanks!
 
Hi

What controls do you have on your form? Or is it just the combobox?


Cheers
Nikki
[bat] Look, mommy, I'm flying!
 
Without seeing it, my only guess is with a modal form code execution stops and the form basically gets the resources. If there are other events processing the modless form is competing. I would try adding doevents to your code when the form opens, so that any pending events execute and then your form events will occur.
 
I don't know what happened or what changed, but the file now seems to be processing just as quickly when the form is modeless.

Thank you both for your posts. - Cory
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top