I have VBA in an Excel workbook which opens another Workbook.
It opens the new Workbook, but when I Activate the Original Workbook it doesn't switch.
Strangest thing is, that when I do a code step by step, it does switch.
Why is this?
Sub Switch_Script()
Application.Workbooks.Open ("C:\Export.xlsx")
Workbooks(Original_Excel.xls).Activate
End Sub
It opens the new Workbook, but when I Activate the Original Workbook it doesn't switch.
Strangest thing is, that when I do a code step by step, it does switch.
Why is this?
Sub Switch_Script()
Application.Workbooks.Open ("C:\Export.xlsx")
Workbooks(Original_Excel.xls).Activate
End Sub