Open and Switch does not work

eniemans

New Member
Joined
Jun 18, 2015
Messages
1
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
 

Forum statistics

Threads
1,084,856
Messages
5,380,318
Members
401,664
Latest member
traveler84

Some videos you may like

This Week's Hot Topics

Top