Access Wizard

G

Guest

The Import Wizard in Access works well for one of my applications, but I want
to replicate this functionality in VBA. In other words, I want to know the
code that steps through all of the options in the wizard for File/Get
External Data/Import from Excel. The options are: (1) specify Excel file
name, (2) specify worksheet name, (3) first row contains column headings, (4)
store in new table, (5) select fields, (6) assign primary key, (7) specify
table name.

Can I automate this in VBA, or do I have to keep using the wizard?

Thanks!
 
A

Allen Browne

George, look at the arguments for the TransferSpeadsheet action.

You can then create an interface to get those answers from the user, and
perform the action.

The only difficulty you could have with that would be in getting the
FileSave dialog. See:
http://www.mvps.org/access/api/api0001.htm
 
D

David C. Holley

You can automate it. However,

1. Using the wizard should be much easier
2. All of the wizards are contained in a library database. There is a
way to display the forms & code in them, however when I just snooped
around myself, I couldn't figure it out. The wizards aren't top secret
so it shouldn't be too difficult to view the source.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top