View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
wgl wgl is offline
external usenet poster
 
Posts: 4
Default Import External Data Wizard

I am trying to initiate the Import External Data Wizard using code. I'm using
Excel 2003. I've tried using the following code:
Dim ImportData As CommandBarButton
Set ImportData = CommandBars("Worksheet Menu Bar") _
.Controls("Data").Controls("Import External Data").Controls("Import
&Data...")
ImportData.Execute

The above code results in the following error.
2147467259 - Execute Failed

I also tried to use Application.Dialogs, but I was not able to find the
right dialog.

How can I accomplish this?