Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Not in KC anymore
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    UserForm help (97)

    I'm very unfamiliar with userforms, so please explain in layman's terms.

    I need a userform to appear either on execution of another macro, or some other deliberate way.
    I need the userform to ask a question with the possible answers on the command buttons.
    I need the userform to call on one of four macros based on which command button is clicked.
    And I need the userform to disappear after the command button is clicked.

    I appreciate any and all help received.

    Many thanks!

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: UserForm help (97)

    This example does all you want to do.
    Look at the simple code in VBE (alt-F11)
    Under module and userform

    Post specific questions if you don't understand the code.

    Steve
    Attached Files Attached Files

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm help (97)

    I've made this little file that enables you to create questions with three possible (but short) answers.

    Just fill in the table marked "Questions".

    The table has comments in the cells at the top which describe their goal.
    Attached Files Attached Files
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Not in KC anymore
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm help (97)

    Thanks a bunch.

    I took this one and modified as needed.

    It works on my Excel 97, but it hiccups in 2000.

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm help (97)

    No trouble with my XL2000. What hiccup did you get?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  6. #6
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm help (97)

    Look at Post 197294 as the attached file contains various examples of Userforms/code.

    John

  7. #7
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: UserForm help (97)

    Questions!H14 has #REF! in it, needs to have a number, but it was a great example. Gives:
    Attached Images Attached Images
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  8. #8
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm help (97)

    Ah. So problem solved, right?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  9. #9
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Not in KC anymore
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm help (97)

    The problem I had was with the code I had written. Not yours. Thanks again.

Posting Permissions

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