file prompt

  • Thread starter Thread starter larry hensel
  • Start date Start date
L

larry hensel

my macro calls a file to be copied into the spreadsheet.

Workbooks.Open Filename:= _
"C:\Documents and Settings\lhensel\My
Documents\data file.xls"
Sheets("ITEM370").Select
Sheets("ITEM370").Move Before:=Workbooks("macro
file").Sheets(1)

the data file name is sometims different and the sheet
sometimes changes too. is their a way to prompt for a
filename?

thanks,

larry
 
Have a look at
Application.GetOpenFileName

this shows the standard Excel File open dialog.
 

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