let user specify table name when importing excel?

J

Jeremiah

I have used a module to call a windows browse/open API
and now want to import my excel file to a table.

i have used the following code to import the
spreadsheet and started a Docmd.Transfer to move it to a
table. Preferably i would like the user to specify the
table, though i can't see anything to help with this.
I will probably use the Kill command to delete the
existing table before import if problems occur.


Sub ..._On_click
Dim varFile As Variant
varFile = getopenfile()
if not isnull(varFile) then
'now have the filename.
DoCmd.TransferSpreadsheet acImport,
acSpreadsheetTypeExcel8, "TableName"(want user to
specify), "SSheetName"(hopefully this is pulled from my
code)

any ideas greatly appreciated.
 

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