open file with macro

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
 
P

Paul B

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
 
Top