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.
 
Back
Top