+ Reply to Thread
Results 1 to 9 of 9

Macro with user form to fill in Information

  1. #1
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    399

    Macro with user form to fill in Information

    I have tried to make a form using the view code button and have failed miserably. I am attaching the file with the information needed if someone could please help.
    Attached Files Attached Files
    Last edited by Wskip49; 09-22-2011 at 08:19 PM.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Macro with user form to fill in Information

    Hi,

    Hopefully this example will get you started. If you have trouble making the rest of the text boxes or adding further features, let me know. I'm not an form expert, but there are a lot of pros here who can jump in at any time.

    Good luck.

    abousetta
    Attached Files Attached Files
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    399

    Re: Macro with user form to fill in Information

    This has help greatly. However, how can I run the form without having to shut the file and reopen it.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,243

    Re: Macro with user form to fill in Information

    Hi,

    I took the UserInfo.Show and put it in a Module, instead of having it as an event behind the workbook. Now click on the button and see what happens.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Macro with user form to fill in Information

    I like MarvinP's insidious placing of the userform call button. Also I made some minor modifications like using an array to pass the values (makes for less typing) and corrected the TabIndex order. Finally I added some comments describing what everything is just in case anyone reads the code who is not familiar with vba.

    If you interested in something more advanced (e.g. database features), I know that J-walk and RoyUK have some nice turnkey solutions you can apply.

    Hope this helps.

    abousetta
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    399

    Re: Macro with user form to fill in Information

    Thanks to all who have help me with this. I need some more help if possible. I am attaching the file again. I would like to add a drop down to choose from. under membership, how can I do a drop down box with the following: Full, Retired, Honorary, Student, Affiliate. Under the phone numbers I would like to set them up to be consistent with phone numbers.

    Thanks
    Attached Files Attached Files
    Last edited by Wskip49; 09-21-2011 at 02:06 PM. Reason: Add file

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Macro with user form to fill in Information

    Hi,

    OK. Regarding the membership type, there are two possibilities I can think of easily. I have put both of them for you in the excel sheet.

    Option #1: Create a combobox in the userform and results populated in Column N

    Option #2: Create a dropdown menu (Data --> Validation --> List) on the excel sheet itself that you can choose from after the userform is closed (Column O).

    Your choice.


    As for your second question regarding numbers, you will need to be a little more detailed in your request. For example, do you want several text boxes on the userform and then the phone number is populated in the excel sheet or how do you envision the final result?

    Hope this helps.

    abousetta
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    399

    Re: Macro with user form to fill in Information

    Thanks so very much. This is a great help.

  9. #9
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Macro with user form to fill in Information

    Hi,

    If you are satisfied with the answers, then please mark the thread as Solved.

    Good luck.

    abousetta

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1