Order of Files Opening

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have three files which I have named with sequential numbers in the front
of the name such as:
1_xxx
2_xxx
3_xxx

I did this because I want the files to open in this order. However, when I
open the files they do not open in this order. I have recently converted to
Excel 2003, I never had this problem in Excel 2000.

Any suggetions would be much appreciated.

John
 
Create a New Workbook - Save it as MyOpen3Files.xls
Paste the below code into a standard module

Sub Open3Files()
'
' Macro1 Macro
' Macro recorded 6/26/2007 by Jim May
'
ChDir "C:\My Documents" 'change to suit
Workbooks.Open Filename:= _
"C:\My Documents\1File.xls" 'change to suit
Workbooks.Open Filename:= _
"C:\My Documents\2File.xls" 'change to suit
Workbooks.Open Filename:= _
"C:\My Documents\3File.xls" 'change to suit
Thisworkbook.close
End Sub

In the Thisworkbbok module paste:

Private Sub Workbook_Open()
Call Open3Files
End Sub
 

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