Fitting Workbook to Different Screen

Pacman52

Active Member
Joined
Jan 29, 2009
Messages
370
Office Version
  1. 365
Platform
  1. Windows
Hi all

Does anyone know how I would 'fit' a WB to show the same way it does on my monitor?

The WB is coded to open maximised and has some 'pop up' Userforms and some buttons on different sheets which are all positioned exactly where they should be on my monitor but when I transfer the WB to another smaller monitor the various 'elements' appear of centre.

I've read some possible solutions to this but they all seem to be for 32bit and I'm on 64bit. Also it may be easier if I point out the WB will only be used on 2 computers mine and my partners, both capturing different data so with that in mind is there a simple way to 'design' two versions, one for each monitor on my monitor if I can find out the resolution.

Thanks

Paul
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
A simple way with userforms is to add code to the form's Activate event to center the form on whatever monitor.
VBA Code:
    With Me                           ' Center Screen on whatever monitor Excel is running on
        .StartUpPosition = 0
        .Left = Application.Left + (0.5 * Application.Width) - (0.5 * .Width)
        .Top = Application.Top + (0.5 * Application.Height) - (0.5 * .Height)

        If .Height > Application.Height Then
            .ScrollHeight = .Height
            .Width = .Width * 1
            .Height = .Height * 0.8
            .Zoom = 100
            .Top = .Top + 60
            Me.KeepScrollBarsVisible = fmScrollBarsVertical
            Me.ScrollBars = fmScrollBarsVertical
        End If
    End With
 
Upvote 0
Solution
Many thanks for the reply - As I needed to get this finished in the end I just re-designed the WB on the actual screen resolution of the monitor and made some minor adjustments via TeamViewer so all is ok now but that code will 100% be used on other projects so I'm really grateful for you referencing it.

Paul
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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