View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pdberger pdberger is offline
external usenet poster
 
Posts: 258
Default Open workbook in user-defined folder

I've written a set of two workbooks for use by many different people.
"Instrument Panel User Data.xls" calls information out of "Instrument Panel
Reference Data.xls".
I don't know where each user will store these two files but I want to set
things up so that, as long as they're in the same folder, the 'User Data'
will find and open 'Reference Data'.

My code don't work! Here it is:

Private Sub Workbook_Open()
Dim File_Path As String
Dim File_Name As String

File_Path = ThisWorkbook.Path
File_Name = File_Path + "Instrument Panel Reference Data.xls"
Workbooks.Open Filename:="File_Name"


End Sub

What am I doing wrong? Do I have to slit my wrists? Say it ain't so!