View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Auto-Open other file

One way is to use a macro:

Option Explicit
Sub auto_open()
Dim WkbkName As String
Dim TestStr As String

WkbkName = "book2.xls"

TestStr = ""
On Error Resume Next
TestStr = Dir(ThisWorkbook.Path & "\" & WkbkName)
On Error GoTo 0

If TestStr = "" Then
MsgBox "design error! " & WkbkName & " wasn't found."
Else
Workbooks.Open Filename:=ThisWorkbook.Path & "\" & WkbkName
End If

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

aposatsk wrote:

Upon opening my main excel file, I would like another file in the same
folder to be opened. Is this possible?

--
aposatsk
------------------------------------------------------------------------
aposatsk's Profile: http://www.excelforum.com/member.php...o&userid=36709
View this thread: http://www.excelforum.com/showthread...hreadid=567601


--

Dave Peterson