Moving application windows from Excel VBA

cherria1

New Member
Joined
Dec 15, 2017
Messages
6
Hi
Background: Every time my laptop which is connected to 2 DVI monitors goes to sleep, when I wake it, all the application windows have moved around. This means each time I wake it I have to rearrange the windows again.

What I want is a macro that steps through each running application and activates it, sets the Top Left Corner to the top left of the screen (0,0), and sets the window size to (say) 500x500.

Can that be done from Excel VBA?

I have seperately written a macro within Outlook VBA to reposition every open email back to a set position, but I can't see how I control other applications.

Help, it's driving me nuts, and no I have no control over windows settings, it is completely locked down by out company IT policies.

thanks
Andrew
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Um? So you have three screens? Laptop and two other?

Is this not a windows issue?
I'm not techie, but what does Control Panel tell you about connected devices?
 
Upvote 0
I've tried all the windows routes that is why I have come here to see if there is an Excel VBA workaround. I have no other scripting tools available as it is a locked down setup. Perhaps I shouldn't have given the background and instead:

Is there a way in excel VBA to
1. Identify all active applications
2. set the top left corner and the width and height of each

thanks
 
Upvote 0

Forum statistics

Threads
1,214,996
Messages
6,122,636
Members
449,092
Latest member
bsb1122

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top