Userform is not visible/does not show up if there is a code assigned to it as it load

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875

Here's current code...
Is it not showing my form because 'm assigning a code to run as it Initialize?

I just dont know what to do....Please advice.

Thanks in advance.
Code:
[/FONT]
[FONT=Courier New]Option Explicit
Sub StartFalhLoop()
Call ShockwaveFlash1.LoadMovie(0, CurDir + "/vbSample.swf")
Me.ShockwaveFlash1.Movie = "E:\Personal_Files\Recent\DownloadedFile.swf"
End Sub
Sub StopFalhLoop()
Call ShockwaveFlash1.LoadMovie(0, CurDir + "/vbSample.swf")
Me.ShockwaveFlash1.Movie = ""
End Sub
Private Sub UserForm_Initialize()
 StartFalhLoop
 Me.StatusL.Caption = "Running code one..."
 Me.Repaint
 Application.Wait Now + TimeValue("00:00:02")
 Run "Mycode1"
 Unload Me
End Sub
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Why are you unloading the form in the userform Initialize event.

As far as I know the userform doesn't actually display until the code in that event is completed.

But the last command you have tells VBA to unload it, so there's nothing to display.

I'm pretty sure that isn't what you want to do but I'm not sure what you actually want to do.
 
Upvote 0
Norie, thanks...i didnt see your comments earlier....that makes sense...Thanks again
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

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