I want to open the the dialog box provided by menu item Data->Import External Data->"New Database Query" when the xls file is opened. I am doing this in record macro.
When I retreive the Command Control for "New Database Query" and execute it, I get "Automation Error, Unspecified Error". Is there anything wrong that I am doing here ?
Following is the code:
I have also tried an alternate approach to get the control using the following command:
Here I get the dataMenu as Nothing.
Is there any way I can open the dialog box for "New Database Query" through a macro.
Bookmarks