Forum Discussion
DBreezy92
Apr 06, 2021Copper Contributor
VBA code to zoom out when an option is selected on a data validation list
I find the small font size when using data validation annoyingly small as I am usually on 70% zoom. I have found the following vba code which automatically zooms in when a dropdown list is select...
HansVogelaar
Apr 06, 2021MVP
Try this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim dv As XlDVType
On Error Resume Next
dv = ActiveCell.Validation.Type
On Error GoTo 0
If dv = xlValidateList Then
ActiveWindow.Zoom = 100
Else
ActiveWindow.Zoom = 70
End If
End Sub