This is word visual basic BTW.
How can I make an action button open a userform In Visual Basic?
I think what you are asking is how to open another form (Form2) by pressing a button (Button1) on the currently displayed form (Form1). If that is your question, here's the answer:
Private Sub Button1_Click (ByVal sender as Object, ByVal e as EventArgs) Handles Button1.Click
dim F2 as new Form2
'If you want your new form to show on top
'of your current form and your current form
'to be inactive while your new form is displayed, use:
F2.ShowDialog()
'If you just want to open your new form
'and not have it tied to the original form, use:
F2.Show()
End Sub
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment