Finance

Charts

Statistics

Macros

Search

Displaying a Custom Form or UserForm in Excel VBA

To display a UserForm, you execute the Show method in a statement using the syntax FormName.Show. For example, if you followed the same steps as shown in the previous sections to create the UserForm frmEmployees, you could have a simple macro like this to call the UserForm:

Sub EmployeeForm()
    frmEmployees.Show
End Sub

If you want to see what the UserForm looks like when it is called in the actual worksheet environment, without having to write a formal macro yourself, you can type frmEmployees.Show in the Immediate Window and press Enter. The following figure shows how you and your users will see the example UserForm.

0 0 votes
Évaluation de l'article
S’abonner
Notification pour
guest
0 Commentaires
Le plus ancien
Le plus récent Le plus populaire
Online comments
Show all comments
Facebook
Twitter
LinkedIn
WhatsApp
Email
Print
0
We’d love to hear your thoughts — please leave a commentx