Good day everyone!
I want make a macro that would cycle through active windows apps just like when you press Alt + Tab repeatedly. So far all I could do is cycle through different workbooks using this syntax:
a book taught me this:![]()
For i = 1 to Workbooks.Count Windows(i).Activate "do whatever you wanna do" Next i
The above code worked but it also creates an empty document by default when all I want is to simply switch between Excel and Word as if I was pressing Alt + Tab.![]()
Sub StartWord() Application.ActiveMicrosoftApp xlMicrosoftWord End Sub
To give you a clearer picture, lets say I have Excel, Word, Powerpoint and Firefox running at the same time. I want to make a macro that would cycle through all these applications as if I was pressing Alt + Tab repeatedly.
Hope you guys can help! Thanks in advance!![]()
Bookmarks