Import xls file..vba excel2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
How can I import the contents
of an .xls file on users harddisk
to the current worksheet via
vba?

Or better way to get the xls data
of a file to my worksheet which
holds my macro to do the work
needed.

Thanks For Your Time.

Cheers,
Paul
 
Open the file in Excel. Write you macro to work on the activeworkbook - a
macro can work on other than the workbook in which it is located.
 
Thank You Tom..

Where? How? should I store the macro...
Do I need to have a two files open
to run? One with code and one
with data?

Tks,
Paul
 
I thought you had a macro and wanted to work on data by bringing it into
your sheet with the macro. My suggestion was to alter the macro to work on
the Activeworkbook, then open the workbook with the data and run the macro.

There are many ways to do what you want, but any solution is driven by the
particulars. The answer could be to use your current workbook and use
Data=>Get External data to retrieve data from the source workbook, treating
it as a data file.

Your question could also mean that you don't have access to the users file.
It is a bit hard to know what you are asking and unless you ask a specific
situation, any answer would be very general.
 

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

Back
Top