Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Import External Data Wizard

Hi,
What about using the built-in Dialogs instead:
Dim v
On Error Resume Next
v = Application.Dialogs(xlDialogImportTextFile).Show()
'check v value if user clikc ok or cancel (cancel- false i believe)

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"wgl" wrote:

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?

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

I need to have more options other than text files. The import external data
wizard provides the ability to import data from many different sources.

"sebastienm" wrote:

Hi,
What about using the built-in Dialogs instead:
Dim v
On Error Resume Next
v = Application.Dialogs(xlDialogImportTextFile).Show()
'check v value if user clikc ok or cancel (cancel- false i believe)

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"wgl" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Import External Data Wizard

Concerning the Execute method, i don't know why it doesn't work with this
particular built-in menu item.

Still, using the
Dialogs(...).Show
i would think you could call that particular dialog. In xl2k, you have 3
CommandButtons (New Web Query, New Database uery, and Import Text File). For
web queries it is xlDialogNewWebQuery, for text file it is
xlDialogImportTextFile, but i couldn't find it for database query.
Look in the online help and search 'Built-In Dialog Box Argument Lists';
that's where i found the 2 previous ones.

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"wgl" wrote:

I need to have more options other than text files. The import external data
wizard provides the ability to import data from many different sources.

"sebastienm" wrote:

Hi,
What about using the built-in Dialogs instead:
Dim v
On Error Resume Next
v = Application.Dialogs(xlDialogImportTextFile).Show()
'check v value if user clikc ok or cancel (cancel- false i believe)

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"wgl" wrote:

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?

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

Thanks sebastienm for your imput.

I really need to use the Import External Data Wizard, because it has all of
the import options in one place. I'm trying to make the application easy for
the user to use and for it to be self intuitive . If I can't find a way to do
it from code, the users will have to import the data using the menu which
will have to be explained to some users.

Thanks again.

"sebastienm" wrote:

Concerning the Execute method, i don't know why it doesn't work with this
particular built-in menu item.

Still, using the
Dialogs(...).Show
i would think you could call that particular dialog. In xl2k, you have 3
CommandButtons (New Web Query, New Database uery, and Import Text File). For
web queries it is xlDialogNewWebQuery, for text file it is
xlDialogImportTextFile, but i couldn't find it for database query.
Look in the online help and search 'Built-In Dialog Box Argument Lists';
that's where i found the 2 previous ones.

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"wgl" wrote:

I need to have more options other than text files. The import external data
wizard provides the ability to import data from many different sources.

"sebastienm" wrote:

Hi,
What about using the built-in Dialogs instead:
Dim v
On Error Resume Next
v = Application.Dialogs(xlDialogImportTextFile).Show()
'check v value if user clikc ok or cancel (cancel- false i believe)

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"wgl" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 data import wizard does not support line ends in fields ChrisLime Excel Discussion (Misc queries) 0 February 25th 09 12:07 PM
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
while opening a Office file i am getting Data import wizard Ajit K D Excel Worksheet Functions 0 September 7th 06 08:53 AM
excel import external data wizard ceemo Excel Discussion (Misc queries) 0 March 5th 06 07:06 PM
Get External Data - not editable using Query Wizard MargaretBeckbury Excel Discussion (Misc queries) 7 January 17th 06 09:13 AM


All times are GMT +1. The time now is 05:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"