Reputation: 17
I have tried to write a script to open another excel.
My code
Sub test()
filetoopen=thisworkbook.worksheet("sheet1").Range("D18")
Where is my mistake?
Thank you for your advice.
Upvotes: 1
Views: 78
Reputation: 4842
You can use:
Sub test()
filetoopen = ThisWorkbook.Worksheets("sheet1").Range("D18")
Workbooks.Open FileName:=filetoopen
ActiveWindow.ActivatePrevious
Upvotes: 2