What is the syntax to open a userform?

<userform name>.Show
'example
frmHome.Show

 

Advertisements

What is the syntax to change a button’s display text?

 <button name>.Caption = "<new text>"
'example
btnPause.Caption = "Resume"

 

What is the syntax to open a userform in the top-right screen corner?

 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