Zooming the screen

Back

INTRODUCTION

Sometimes, it is quite useful to modify the zoom of your screen, for example, when you have to deal with a big amount of data in a single sheet. You will enjoy an helicopter view on your spreadsheet, as well as a microscopic one.

ROUTINES
This routine calls the ZoomScreen sub routine [1].
This routine shows the Userform [2].
This routine modifies the Zoom[3].
This routine displays the Zoom value in percentages [4].
This routine closes the dialog box [5].
This routine activates the scrollbar as a mean to define the zoom value [6].



[1]--------------------------

Private Sub
Zoom_Click()ZoomScreen
End Sub

[2]--------------------------

Sub ZoomScreen()
UserFormZoom.Show
End Sub

[3]--------------------------

Private Sub
UserFormZoom_Initialize()
LabelZoom.Caption = ActiveWindows.Zoom & "%"
' Zoom
With ScrollBarZoom
.Min = 10
.Max = 400
.SmallChange = 1
.LargeChange = 10
.Value = ActiveWindow.Zoom
End With
TextBoxZoom.Text = ActiveWindows.Zoom
End Sub

[4]--------------------------

Private Sub LabelZoom_Click()
.Caption = ActiveWindows.Zoom & "%"
End Sub

[5]--------------------------

Private Sub OKButton_Click()
UserFormZoom.Hide
End Sub

[6]--------------------------

Private Sub ScrollBarZoom_Change()
ActiveWindow.Zoom = ScrollBarZoom.Value
TextBoxZoom.Text = ScrollBarZoom.Value
End Sub

-----------------------------

PICTURE 1



Back