Is there a UserForm creation guide with example VBA code

zookcruzr

New member
Joined
Jul 17, 2014
Messages
6
Reaction score
0
Points
0
Location
Australia
Hello all,
As the title suggests I am hoping to find a decent guide on creating code for a UserForm.
I have created one, I just need the fields to enter the data in an existing worksheet and the command buttons to work lol.

Additionally I was hoping to have a dropdown box in the form to select which worksheet the data is going in.

There are a few other advanced things I'd like the form to do, but am unsure whether it is possible. I'll ask once I have the form entering data in properly.

Attached is a spreadsheet with the userform saved in it. I haven't worked out how to place it in a worksheet, or possible have a macro run when the spreadsheet is opened to automatically open the form. Still learning as I go.

NB: I have removed suburb and last names to ensure privacy is maintained.
 

Attachments

  • Mental Health Transport TEMP.xlsm
    183.7 KB · Views: 31
I see from the userform that you have a date field AND a combobox to choose the sheet; wouldn't it be feasible for the user to enter a date and have the code work out what sheet the data should go into?
I left a response to your other thread - your answer there could impact this thread.
Could you do a little test for me? I've added a DateTime Picker control to the top left of your userform, could you do a 'userform1.show' and try and select a date in the date picker and tell me if it works, what's more it should also enter a date into the date field; does that work too?
 
Could you address this please.
Could you do a little test for me? I've added a DateTime Picker control to the top left of your userform, could you do a 'userform1.show' and try and select a date in the date picker and tell me if it works, what's more it should also enter a date into the date field; does that work too?
 

Attachments

  • ExcelGuru3319Mental Health Transport TEMP01.xlsm
    182.7 KB · Views: 35
Back
Top