Using VBA to prompt user to select cells (possibly on different sheet) [duplicate] Using VBA to prompt user to select cells (possibly on different sheet) [duplicate] vba vba

Using VBA to prompt user to select cells (possibly on different sheet) [duplicate]


This isn't using the built in that you showed above, but does allow you to select a range of cells following an income prompt:

Sub RangeSelectionPrompt()    Dim rng As Range    Set rng = Application.InputBox("Select a range", "Obtain Range Object", Type:=8)    MsgBox "The cells selected were " & rng.AddressEnd Sub

This is based on the answer given in this MrExcel answer.

Here is how it looks in use:

enter image description here


What you are looking for is a dialog box (also called a common dialog). Unfortunately you cannot add one to the existing built in objects (at least not using VBA).

As mentioned above you can mimic this functionality using InputBox and Forms. That said I have seen proprietary programs that are based on Excel where the company added the type of functionality you describe. However, I believe you have to use C++ or a deeper language to create DLLs that can accomplish this

One thing worth noting about dialogs: Excel has a built in Common File Dialog object library which allows you to create common file server dialog boxes (such as Open, Save & Select) using existing Windows API dialogs.