Show Userform

Oorang

Well-known Member
Joined
Mar 4, 2005
Messages
2,071
Is it possible to run code while still showing a user form if you did not start the code from the form? If I am running code forma module and do userform1.show, the code stops until the form is closed.

Alternately is there an event for when the user form fully displays?
(I tried activate and initialize and they both trigger before the form fully displays, so you see nothing but white box.)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
What are you trying to accomplish? Do you want to make a splash screen or a loading screen?
 
Upvote 0
Hi, Oorang,
try this
Code:
Sub test()
MsgBox "code started", 48, "title"
UserForm1.Show (vbModeless)
MsgBox "code ended", 48, "title"
End Sub
last message pops up
AND
userform can be used

kind regards,
Erik

EDIT: just curious: what are you trying to do ?
 
Upvote 0
Got it!
You can make a user form with whatever you want on it. Then make a label with a null caption and some appropriate color the progress bar. Try it out:)

Code:
Function A()
Dim X As Byte
For X = 1 To 100 Step 1
UserForm1.Show (vbModeless)
Application.Wait (TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 1))
UserForm1.Label1.Width = X
UserForm1.Repaint
Next X
Unload UserForm1
End Function

Thanks Eric you Rock:)
 
Upvote 0
I understand you for
____________________________________________________
|||||||||||||||||||||||||||||| %
____________________________________________________

curious what you will come up with :wink:
 
Upvote 0
erik.van.geit said:
I understand you for
____________________________________________________
|||||||||||||||||||||||||||||| %
____________________________________________________

curious what you will come up with :wink:
our posts crossed

you're making good progress with your code !!
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,272
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top