Opening Variable File Names

  • Thread starter Thread starter simoncohen
  • Start date Start date
S

simoncohen

I need to write a Macro to ask for an input number (say 123) and the
open a series of workbooks based on this input - e.g. AA123.xls
AB123.xls. Can anybody please suggest some code to enable this. Thank
 
ans= Inputbox("Please supply file id")
If ans <> "" Then
Workbooks.Open Filename:= "AA" & ans & ".xls"
End if

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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