vbModeless Question

M

MWS

By design, I have a splash screen being displayed while data is being
formatted in my program - this is purely cosmetic, since I wanted the user to
not view the "flashing" of the screen as the code executed. The splashscreen
is displayed via:

frmOpportunitySplash.Show vbModeless

The issue I'm having is, when the splash is displayed, it is all white. In
design mode you can see the clored background and the label, but when it's
executed, the splash is all white. I thought maybe there was a property I
would have to change due to the "vbmodeless", but I'm completely puzzled.

Can anyone tell me how to rectify this situation?

Any and All Help Will Be Appreciated
 
J

Jim Thomlinson

You can suppress the flashing of the screen by adding

Application.screenupdating = false

at the beginning of the code and

Application.screenupdating = true

at the end. I don't know if this removes your need for a splash screen, but
just for your reference. so if the code takes a while to execute you could
just unhide and select a sheet with your message on it kinda like this

sub DoYourStuff
on error goto ErrorHandler
with sheets("Wait Message")
.visible = xlVisible
.select
end with
application.screenupdating = false
'Do your stuff here
ErrorHandler:
sheets("Wait Message").visible = xlVeryHidden
application.screenupdating = true
End sub
 
T

Tom Ogilvy

Issue a doevents right after displaying it


frmOpportunitySplash.Show vbModeless
doevents
 
L

Leith Ross

Hello MWS,

Another trick is to repaint the UserForm...

frmOpportunitySplash.RePaint

Sincerely,
Leith Ross
 

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