Import Data button

D

DaveM

Hi

I have a userform and would like to put an Import Data Button, what's the
code behind the button, I've been looking and recorded a macro to get it,
with no luck.
What I'm trying to create is click the button which opens
C:\Documents and Settings\Dave\My Documents\My Webs\Tests

I then choose the file and import.

This would be a time saver.

Thanks in advance

Dave
 
G

Guest

Use getopenfilename to get filename. A pop up window will appear to let you
select the file.
FileName = Application.GetOpenFilename("Excel Files (*.xls), *.xls")


Post your macro if you need aditional help.
 

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