When my VBA script cannot figure out which Worksheet to use, it opens an Excel dialog: "Select Sheet". This is fantastic! How do I programmatically take control and use that "Sheet Select" dialog?
I'm writing a code that uses
Application.FileDialog(msoFileDialogFilePicker)
..To set a variable = a chosen filename, but I'm also trying to set a variable to a certain Worksheet in that file. All without opening the file.
I want the workflow to be:
- File Dialog opens -> Select an Excel file > OK
- Worksheet Dialog opens (like Excel's "Select Sheet" dialog) -> Select one of the Worksheets in that Excel file > OK
I've been through Application.Dialog(xl...) stuff, but can't find the right option.
Please help! and thanks.