Macro to open seperate workbook

  • Thread starter Thread starter TS
  • Start date Start date
T

TS

I have not been able to create a macro to open a seperate workbook
I am in workbook A and would like to run a macro that will open workbook B
 
Here you go. Please note that MyWB is a string variable which is the path of
the workbook you wish to open.

Sub WBOpen()
Dim MyWB As String
MyWB = "C:\Documents and Settings\Rick\My Documents\UpdatedOPEX.xls"
Workbooks.Open MyWB
End Sub
 
Back
Top