I'm creating a new project and I want to activate a userform that I've created in Visual Basic but how can I get this userform activated when I use a button in Excell.
You can use Userform1.show (assuming your user form is called Userform1, the default).
If you need more help on how to add this in your code let me know.
You have to use the .show method, as Kryz mentions above. Since you can't assign the method directly to a button, you have to assign a macro to the button, and have the macro perform the .show method. That's assuming you used the button from the "forms" toolbar; if you used the button from the "controls" toolbox, you would add the .show method in the CommandButton_Click event handler. If you need help with either approach, just follow up here. Rob
Sub naaruserform()
'
' jaaroverzicht Macro
' De macro is opgenomen op 25-11-2002 door Joep Spronck.
'
'
UserForm1.Show
End Sub
I receive the message "object vereist"
What I want to do is the following,
I want that when I use a button the userform pops-up and I can fill in and select various thinks But first the userform needs to pop-up.I filled in the above mentioned macro in module3.But this is not working.
When this is working I will start with making macro's for the boxes in this userfrom.(I've called this on Budget)
But the name is still defaul userform1.
I hope you can help me with this.
It's my first time I really are going deeper in VBA.
I bought some books but there I only can find the "basic"macro's.
I've renamed the file from userform1 to Budget that was the reason for the error.
This was a great help!!
Now I will start ( trying : ) ) with the macro's from the userform so I mean to assign from a choice list and text box the data to specific sheets in the excell map and for the choice list to receive the information from a requested excell sheet with the range (do you guys know the defenition for this ? )
Joep,
Not sure what you're asking there - but it sounds like you may be trying to fill the list in your combobox/listbox with data from a worksheet. In that case, you'll want to look into the rowsource property of your combobox. Excel VBA help can get you started. Rob
In my Userform I've got a calender insert now I want that If I choose a date in this calender that the information that has been chosen from the "keuzelijst" will inserted in a the worksheet corresponding to the month of this calender and that in this same sheet in the cell the date will be copied.
(For youre information I'm creating a financial overvieuw of income and expences and I want with the userform( with different pages income and expences)to tell wich income or aepnce the value and the date and this information needs to be transferred to the corresponding month)
I know it's a lot but I'm getting closer and closer to the result but now only this userform needs to get working.
-so the user can chose a page ( income or expences)
is working
- can choose in a keuzelijst the kind of income or expences
(need to assign these)
- has to fill in the value of the income or expemnces in a text box
- and has to click on the agenda the date this transfer has been made.
and then press "ok" or "cancel"
when cancel the userform will be hidden ( is working : ))
When ok the information,
income or expenses to the month thas corresponding to the agenda
with the value and the type of income or expences.
I hope somebody can help me with getting this userform up and running.
Helping you with all of the above, without knowing where you get stuck, would be like writing all the code from scratch. Please let us know how far you've gotten (post your code if you think it's helpful), and where you are having problems.
Cheers Rob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.