Import data into worksheet

  • Thread starter saman110 via OfficeKB.com
  • Start date
S

saman110 via OfficeKB.com

Hi,

I'm looking for a macro that prompts and forces the user to import 2 files
and copy it into two different worksheets. (If possible, when user denies to
import files, Excel close)

First file is a .csv file that. when user imports the file, It should be
imported to wks1.
Second file is a .xls file which goes to wks2.

Any help?

Thx.
 
E

Earl Kiosterud

You can use Data - Import external data - import data to read the data into a sheet. Once
set up, you need only refresh it (right-click the area and choose refresh). A macro could
do the refresh (just record a macro as you do the refreshes). As for closing the workbook
if the user "denies," when is this supposed to happen?

--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeylake.com

Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
 

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