Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Im using tab code to zoom in on a cell when it is selected. Once the user
leaves the zoomed cell, I would like to return to the previous value of the zoom property before it was set to 120. For example€¦ the user is in cell A1 and they set the zoom value to 75. They then select cell O22 and the zoom value is automatically set to 120. When the leave cells O22, I would like to have the value of zoom set back to 75. I realize I could set this manually with ActiveWindow.Zoom = 75, however, most users have different zoom preferences, so I would like it to go back to what they had set. My code is below... Thanks Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim a As Integer a = ActiveWindow.Zoom Range("a1").Value = a If Target.Address = "$O$22" Then ActiveWindow.Zoom = 120 ElseIf Target.Address = "$D$9:$E$9" Then ActiveWindow.Zoom = 120 ElseIf Target.Address = "$C$19" Then ActiveWindow.Zoom = 120 ElseIf Target.Address = "$C$21" Then ActiveWindow.Zoom = 120 Else ActiveWindow.Zoom = a End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Retrieve | Excel Discussion (Misc queries) | |||
How to retrieve the value? | Excel Discussion (Misc queries) | |||
VBA Code - Retrieve SQL 2000 data -Pivot Table | Excel Programming | |||
How to retrieve the password for VBA code??? | Excel Programming | |||
How to retrieve the password for VBA code??? | Excel Programming |