UserForm Not Visible on Load???

T

TotallyConfused

This is what I have for my UserForm. However, it is still not visible when I
open the file. Can someone please help me with this. I have review the
forum and tried and untried several suggestions but still no form. Thank you
in advance for any help you can provide.


Private Sub UserForm1_Initialize()
Load UserForm1
UserForm1.Show
Me.FormDate.Text = Format(Date, "mm-dd-yyyy")

End Sub
 
J

Jacob Skaria

In VBE (Visual Basic Editor) from the left treeview search for the workbook
name and click on + to expand it. Within that you should see the following

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook

Double click 'This WorkBook' and paste the below code to the right code pane.
'
Private Sub Workbook_Open()
Load UserForm1
UserForm1.Show
End Sub

'Place the below code in User form Initialize event
Private Sub UserForm1_Initialize()
Me.FormDate.Text = Format(Date, "mm-dd-yyyy")
End Sub


If this post helps click Yes
 
T

TotallyConfused

This worked! Thank you very much! : )

Jacob Skaria said:
In VBE (Visual Basic Editor) from the left treeview search for the workbook
name and click on + to expand it. Within that you should see the following

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook

Double click 'This WorkBook' and paste the below code to the right code pane.
'
Private Sub Workbook_Open()
Load UserForm1
UserForm1.Show
End Sub

'Place the below code in User form Initialize event
Private Sub UserForm1_Initialize()
Me.FormDate.Text = Format(Date, "mm-dd-yyyy")
End Sub


If this post helps click Yes
 

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