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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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,211,740
Messages
6,103,640
Members
447,875
Latest member
kaku_1728

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