Userform, button, excel
Geronimo
-
jordane45 Posted messages 30427 Registration date Status Moderator Last intervention -
jordane45 Posted messages 30427 Registration date Status Moderator Last intervention -
Hello,
I created a userform in Excel and I've done this manipulation several times. I want to create a button on an Excel sheet. When you click on it, it triggers the userform.
However, when I right-click, assign a macro, I don't see my userform appearing!
Does anyone have an idea ??
Thanks
I created a userform in Excel and I've done this manipulation several times. I want to create a button on an Excel sheet. When you click on it, it triggers the userform.
However, when I right-click, assign a macro, I don't see my userform appearing!
Does anyone have an idea ??
Thanks
Configuration: Windows 2000 Internet Explorer 6.0
3 answers
-
Hi,
I'm responding a bit late, you never know. If this can help someone
To call a userform via an Excel macro, you need to create a macro in a module that calls the window.
Then, you will assign this macro to the button
For example:
Sub CallUserForm()
TheNameOfMyUserForm.show
End Sub
See you
Gibson-
Hello,
If you're going to make a comment, it should be complete. The action you're referring to is with a button from the FORM tools
With a button from the control toolbox, it's like akmer explains, except that it’s not Hide you should put but...
UserForm1.Show
Catch you later
--
Experience teaches more surely than advice. (André Gide)
If you bump into a pot and it sounds hollow, it's not necessarily the pot that's empty. ;-)(Confucius)
-
-
Mets-toi en mode création et clique deux fois sur le bouton que tu as créé. VBA va s'ouvrir et tape entre les lignes qui apparaissent ceci : UserForm1.Hide (il est possible que ce soit UserForm2 ou UserForm3... cela dépend du numéro de ta UserForm).
-
Seriously, I can see that you are all trying to provide answers, but quite honestly, I'm coming here 8 years later, and a novice has no way of knowing how to solve this question. Could you be a little clearer and provide more detailed answers, please?
-
Hello,
What do you not understand in Gibson's response?
This? :
You need to create a macro in a module
Well... in the macro editor... you go to the INSERT menu / MODULE.
Then, inside, you paste the codeSub AppelerUserForm() Load LeNomDeMaUserForm LeNomDeMaUserForm.show End Sub
Of course... you replace "LeNomDeMaUserForm" ... well... with the name of your userform (usually, by default, "Userform1")
Then, (you should have started there actually...), check out this tutorial
https://silkyroad.developpez.com/VBA/UserForm/
-