Resizing a spreadsheet based on screen resolution

bruty

Active Member
Joined
Jul 25, 2007
Messages
451
Is there any way to change the view size of a spreadsheet dependant on the current systems screen resolution?

I have created a spreadsheet that spans several columns, but I did it on a widescreen monitor with a high resolution. When someone was testing it they mentioned they'd prefer not to keep having to sscroll left or right to view things.

I don't want to make it smaller as then for settings like mine it would be too difficult to read. Any advice would be greatly appreciated.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

I think this should work. It needs to go into the THIS WORKBOOK code window.

Code:
Private Sub Workbook_Open()
    With Sheets("Sheet1")
        Range("A1:P12").Select
        ActiveWindow.Zoom = True
        Range("A1").Select
    End With
End Sub

change refs as required.
 
Upvote 0

bruty

Active Member
Joined
Jul 25, 2007
Messages
451
Hello,

I think this should work. It needs to go into the THIS WORKBOOK code window.

Code:
Private Sub Workbook_Open()
    With Sheets("Sheet1")
        Range("A1:P12").Select
        ActiveWindow.Zoom = True
        Range("A1").Select
    End With
End Sub

change refs as required.

Cheers - will give it a go. I take it it doesn't matter which row numbers I give if I am only bothered about the width fitting on?
 
Upvote 0

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello

the rows will make a difference if you have rows 1:1000, then this will be shown, try

Code:
Private Sub Workbook_Open()
    With Sheets("Sheet1")
        Columns("A:P").Select
        ActiveWindow.Zoom = True
        Range("A1").Select
    End With
End Sub

as alternative.
 
Upvote 0

bruty

Active Member
Joined
Jul 25, 2007
Messages
451
Hello

the rows will make a difference if you have rows 1:1000, then this will be shown, try

Code:
Private Sub Workbook_Open()
    With Sheets("Sheet1")
        Columns("A:P").Select
        ActiveWindow.Zoom = True
        Range("A1").Select
    End With
End Sub

as alternative.

Cheers
 
Upvote 0

Forum statistics

Threads
1,190,590
Messages
5,981,813
Members
439,735
Latest member
Cbegg

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
Top