lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hello
I wrote the code below to activate the second workbook. The code below is work if both workbooks 1, 2 are opened. I minimized workbooks(2) (put it in taskbar) and ran the code below, excel did not try to open workbooks(2)? It did stay in task bar (not opened), why is that? Thank you.
I wrote the code below to activate the second workbook. The code below is work if both workbooks 1, 2 are opened. I minimized workbooks(2) (put it in taskbar) and ran the code below, excel did not try to open workbooks(2)? It did stay in task bar (not opened), why is that? Thank you.
Code:
'dealing with workbooks(1)object
Sub mywb1()
'properties
MsgBox (Application.Workbooks(1).Name)
'methods
Workbooks(2).Activate
End Sub