+ Reply to Thread
Results 1 to 6 of 6

VBA Function inputs

Hybrid View

  1. #1
    Registered User
    Join Date
    10-04-2010
    Location
    Blacksburg, Virginia
    MS-Off Ver
    Excel 2003
    Posts
    34

    VBA Function inputs

    When you type a built in excel function like "=sum(", excel then prompts a statement below that reads SUM(number1,[number2],..). My question is how to make a VBA function make a similar prompt asking for the inputs that the function is requring?

    Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Function inputs

    The only way I've ever seen is a very complicated "hack" of some other function already in Excel you know you'll never use. Not sure I could recommend that.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: VBA Function inputs

    You can't, AFAIK. You can add help for the arguments to the function wizard, but you can't produce the tooltip (though I think in 2010 you can if you create an XLL).
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    10-04-2010
    Location
    Blacksburg, Virginia
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: VBA Function inputs

    what about for a sub?

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: VBA Function inputs

    Where would you have a tooltip for a sub??

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Function inputs

    Actually you have a "little" help on subs and UDFs.

    After you've created your sub, press Alt-F8 from the main worksheet view and click on the macro in the popup list...then click on OPTIONS. Now you can not only select a shortcut key to activate the sub, but you can type out a full description.

    The Description will appear in the macro window when manually select macro (look at the bottom of the window as you click on it) and for UDFs the Desc would appear if you were using the Insert Function wizard.

+ 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