Results 1 to 4 of 4

Thread: Is there a UserForm creation guide with example VBA code

  1. #1
    Seeker zookcruzr's Avatar
    Join Date
    Jul 2014
    Location
    Australia
    Posts
    6
    Articles
    0

    Is there a UserForm creation guide with example VBA code



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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.
    Attached Files Attached Files

  2. #2
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,356
    Articles
    0
    Excel Version
    365
    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?

  3. #3
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,356
    Articles
    0
    Excel Version
    365
    Could you address this please.
    Quote Originally Posted by p45cal View Post
    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?

  4. #4
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,356
    Articles
    0
    Excel Version
    365
    Quote Originally Posted by p45cal View Post
    Could you address this please.
    …which you can't do unless I attach something!
    Here it is.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •