Need Help on this complicated issue - VBA and the API to Dynamically Set Screen and Window Sizes

W

willjohnson33

I have an add-in that several users at work use. We all have dual
screens and like to run one version of excel open but have one workbook
open on each window. I created a sub routine that allows the user to
switch between just a single screen view and a dual screen view with
the ability to toggle the workbooks between the two screens. For
example Book 1, Book 2 and Book 3 are open and the use wants to have
Book 1 on the right screen but Book 2 and Book3 on the left screen. My
toggle allows them to set the Book on either screen. The problem I
have had is that everyone uses different tool bars in excel so when I
created the program I used my screen setup and settings to determine
sizes etc... but it doesn't look right on the other users screens.
Example my windows.width and .height are 675 and 957 respectively but
due to toolbars other users might need 670 and 940.

So
1) Can I somehow setup my add-in so that there is a drop down menu
that has a setup function which determins the screen characteristics
needed to successfuly set each window size for the toggle?
2) Can this setup also have some type of selection to determine
whether the user prefers the left screen or the right screen as their
main screen?
3) Some users have their screen numbers backwards so can the add-in
somehow determine if the left screen is display 1 or if it is display
2?

Any help on this is greatly appreciated as I have been messing with
this for quite sometime with no luck at all.

Thanks,
Will
 
W

willjohnson33

Thanks for the links - they are very helpful. I should be able to
figure this out now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top