If you want to open an excel file, different from the one you are working on, just run the following macro and when the Inputbox shows up just insert the directory of your file.
Sub Open_a_different_workbook()
Dim Wbk As workbook
Dim directory As String
'''''''''''''''
directory = InputBox("Insert the directory of the Wbk File")
Set Wbk = Application.Workbooks.Open(directory)
''''''''''''
End sub
Dim directory As String
'''''''''''''''
directory = InputBox("Insert the directory of the Wbk File")
Set Wbk = Application.Workbooks.Open(directory)
''''''''''''
End sub
To give you an example my directory was C:\Users\Me\Desktop\example.xlsm, so the directory is, actually, the full path to the file.
No comments:
Post a Comment