<userform name>.Show
'example frmHome.Show
<userform name>.Show
'example frmHome.Show
<listbox name>.Clear
'if clearing a userform's listbox from outside the userform
<userform name>.<listbox name>.Clear
'example formHome.lstOutput.Clear
<listbox name>.AddItem <value to be added>
'example - userform called formHome exists formHome.lstGuests.AddItem "Tristan Smith"
<button name>.Caption = "<new text>"
'example btnPause.Caption = "Resume"
Me.StartUpPosition = 0
Me.Top = Application.Top + 25
Me.Left = Application.Left + Application.Width - Me.Width - 25
'example - place in UserForm_Activate procedure
Private Sub UserForm_Activate() 'when form opens
Me.StartUpPosition = 0
Me.Top = Application.Top + 25
Me.Left = Application.Left + Application.Width - Me.Width - 25
End Sub
<calendar name>.Value = <calendar name>.Value <+/-> <number of days you want to move forward or back>
‘examples myCalendar.Value = myCalendar.Value + 1 'move forward one day monthview.Value = monthView.Value -5 'move backward 5 days
VBA IDE > View > Toolbox > Right-click on Toolbox window > Additional Controls > check Microsoft MonthView Control 6.0 (SP6) > In Toolbox, select MonthView control > drag calendar onto your userform
<label’s name>.Caption = “<text>”
'example
lblExample.Caption = “Hello”
Put the code below in a separate module from that of the userform. A common choice for users is the proceduce of Workbook_Open() under module ThisWorkbook.
Private Sub Workbook_Open() <user form name>.Show End Sub
Do not use the load method, as this just loads the form but does not make it visible. Besides, Show option automatically loads it anyway.
Load <user form name>