Open the "Function Arguments" dialog box via VBA

calisooner

New Member
Joined
Jul 28, 2009
Messages
2
I'm hoping to open the Function Arguments dialog box via vba for a user-defined function. I couldn't find any reference to this dialog box (or to the Insert Function dialog box, for that matter) on Microsoft's support site. I'm using Excel 2003. Thanks in advance for any insight.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Try this:
Code:
Range("Your Range").FunctionWizard

Edit: Ah, I just reread and didnt notice you wanted it to be a user-defined function. In order for this to work, you need to register the function with the function library. I've never done this, but you at least have some new terms to search for.
 
Upvote 0
Ok, its pretty simple apparently. To register function:
Code:
Application.MacroOptions Macro:="YourMacro", Description:="Description of your macro", Category:=9

The category number refers to the type of macro it is, with the following options being available:
0 - All
1 - Financial
2 - Date & Time
3 - Math & Trig
4 - Statistical
5 - Lookup & Reference
6 - Database
7 - Text
8 - Logical
9 - Information
 
Upvote 0
Thanks for the quick replies...Unless I'm misinterpreting the guidance, why would I need to register the UDF? It already shows up in the "User Defined" category. While the .FunctionWizard code opens the Insert Function dialog box, I was hoping to open the Function Arguments dialog box for a specific UDF, which already shows up in the functions list. Any thoughts on whether this is doable?
 
Upvote 0
I'm not sure if that is a native capability or not. After a little searching, I was able to find this site which offers a downloadable addin, but I haven't used it so no recommendations.
 
Upvote 0
You don't need to register it unless you want your function in a specific category, which I don't recall you asking.

What you could try is to build that formula in the cell and then call function wizard, something like

Code:
Activecell.Formula = "INDEX(A1:A2,1)"
Activecell.FunctionWizard

not ideal I would suggest, but maybe workable.
 
Upvote 0

Forum statistics

Threads
1,222,930
Messages
6,169,111
Members
452,232
Latest member
Gracemarilyn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top