Consulting

Results 1 to 7 of 7

Thread: Create formulas using multiple pop-up input boxes?

  1. #1
    VBAX Newbie
    Joined
    Mar 2012
    Posts
    4
    Location

    Create formulas using multiple pop-up input boxes?

    Hey guys,

    I'm trying to create a macro so that whenever i hit the keys assigned to the macro, it will bring up a serious of pop-up input boxes, so that i can enter data (both numeric and text) and then have it create a pre-defined formula using the information that was entered into the boxes.

    For instance, one formula i would like to make a macro for would be =cw_act("X","Y->Z"), where X, Y, and Z would be populated by the input boxes.

    Even better would be if the pop-up box would have a pre-populated list of formula options and then depending on which one i select (by number) it would dictate which pop-up boxes I am given and therefore which formula is created.

    Any help would be greatly appreciated! Thanks!

  2. #2
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location
    maybe a userform is the way to go?
    ------------------------------------------------
    Happy Coding my friends

  3. #3
    VBAX Newbie
    Joined
    Mar 2012
    Posts
    4
    Location
    I'm sorry, but I am very new at all of this. Could you walk me through what you are talking about and how I would set that up? Thanks for your quick reply!

  4. #4
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location
    ------------------------------------------------
    Happy Coding my friends

  5. #5
    VBAX Newbie
    Joined
    Mar 2012
    Posts
    4
    Location
    thanks, i will try that out. not sure it is exactly what i was looking for though. im thinking more along the lines of "i hit ctrl-p, it pops up a box with 4 options of formulas, i select one by hitting 1-4, then depending on what option i select, it pops up 3 boxes, one after another, prompting me for the different parts of the formula. Then after the third box, it automatically creates the formula in whatever cell i had initially selected."

  6. #6
    VBAX Newbie
    Joined
    Mar 2012
    Posts
    4
    Location
    Anyone else have any thoughts or ideas? I know someone has to know how to do this. It would really help me out. Thanks!

  7. #7
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    It would be easier to help if we knew which formula options you want avaliable.

    I would go with a Useform. Rather than entering 1-4, I would have 4 option buttions. Depending on which option the user selected, a different page from a MultiPage control would be shown, allowing the user to enter the arguments for that formula.

    Have you looked at Excel's native Insert Function feature? It will handle UDF's and has links to all the descriptions of functions.

Posting Permissions

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