Hi.
Im wondering if anyone knows if its possible to bring up a range selection dialog, and have the selected range returned to the VBA code. I know the code to bring up an Excel Built-In dialog:
Application.Dialogs(xlBuiltInDialog).Show(Arg1, Arg2... Arg29, Arg 30)
where xlBuiltInDialog is any member of the xlBuiltInDialog enum, and Arg1 to Arg30 are optional arguments, depending on what particular dialog you are showing.
However, I am looking for a particular dialog, and I cant seem to find it (If you didnt already know the Excel 2003 Language Reference is pretty weak). The dialog I'm talking about is used all over Excel. It is the dialog that appears whenever you click that little square box with a red arrow in it, its used on a lot of the Excel dialogs.
For an example, on the define named range dialog. Go to Insert->Name->Define. On the bottom right corner, next to the Refers To textbox, you will see the square button with the red arrow. Click it, and it minimises the define named range dialog, allowing the user to select a range, and then that range reference is returned to the textbox.
I want to display that same dialog via VBA code, and then the selected range reference be returned to my VBA code. However, even if I could find the right xlBuiltInDialog enum, I cant see how I can get a return value that contains the reference to the selected range. The Show method has a simple bool return value.
Cheers.
Tyson.
Im wondering if anyone knows if its possible to bring up a range selection dialog, and have the selected range returned to the VBA code. I know the code to bring up an Excel Built-In dialog:
Application.Dialogs(xlBuiltInDialog).Show(Arg1, Arg2... Arg29, Arg 30)
where xlBuiltInDialog is any member of the xlBuiltInDialog enum, and Arg1 to Arg30 are optional arguments, depending on what particular dialog you are showing.
However, I am looking for a particular dialog, and I cant seem to find it (If you didnt already know the Excel 2003 Language Reference is pretty weak). The dialog I'm talking about is used all over Excel. It is the dialog that appears whenever you click that little square box with a red arrow in it, its used on a lot of the Excel dialogs.
For an example, on the define named range dialog. Go to Insert->Name->Define. On the bottom right corner, next to the Refers To textbox, you will see the square button with the red arrow. Click it, and it minimises the define named range dialog, allowing the user to select a range, and then that range reference is returned to the textbox.
I want to display that same dialog via VBA code, and then the selected range reference be returned to my VBA code. However, even if I could find the right xlBuiltInDialog enum, I cant see how I can get a return value that contains the reference to the selected range. The Show method has a simple bool return value.
Cheers.
Tyson.