open file with macro

  • Thread starter Thread starter denadbre
  • Start date Start date
D

denadbre

Hi,

I have recorded the following macro to open a file and arrange th
data:


ChDir "C:\My Documents\workexamples\COMPLIANCESAMPLING"
Workbooks.Open Filename:= _
"C:\My Documents\workexamples\COMPLIANCESAMPLING\2004599.STF"
Editable:=True

what I need to do is be able to open any file with this macro not jus
the above file. Any help would be much appreciated.

Thank you in advance,
Denadbr
 
Denadbre, maybe this?

ChDir "C:\My Documents\workexamples\"
Application.Dialogs(xlDialogOpen).Show

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2003
 
Check out the GetOpenFileName method in Help. I believe it has an example.
 

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