MEnewb1143 Posted November 9, 2008 Report Share Posted November 9, 2008 Any way to switch to the previous/last window? Long story short, I've got a Visual Basic window open that I made with some buttons. When I click on a button, it starts to run the macro from that window, not the one intended for. Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 9, 2008 Report Share Posted November 9, 2008 Any way to switch to the previous/last window? Long story short, I've got a Visual Basic window open that I made with some buttons. When I click on a button, it starts to run the macro from that window, not the one intended for. Can't you just use Activate Window as one of your first commands, to switch to the target window? If its name changes, you could adapt the method from your last thread. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
MEnewb1143 Posted November 9, 2008 Author Report Share Posted November 9, 2008 Thought of that. When I hit a button in a Visual Basic program, all it does it run the macro. At that point the window is switched. I need to 'last window' since it is from an email and the subject line becomes the window title so it always changes. :/ Quote Link to comment Share on other sites More sharing options...
johnboy691 Posted November 12, 2008 Report Share Posted November 12, 2008 Can you use (Alt Down) TAB (Alt Up) Quote Link to comment Share on other sites More sharing options...
stan Posted November 12, 2008 Report Share Posted November 12, 2008 Can you have the macro minimize your VB program window as the first step of the macro? Then the previous window should have focus. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.