View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Import Data button

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.
"DaveM" wrote:

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