View Single Post
 
Old 12-09-2014, 07:18 AM
Phil H Phil H is offline Windows XP Office 2003
Advanced Beginner
 
Join Date: Jun 2010
Posts: 81
Phil H is on a distinguished road
Default Increase Font Size in a DV List Box

Understand from other forums, this cannot be done. A workaround is to zoom up the worksheet when any DV cell is selected. The following code (from Contextures http://www.contextures.com/xlDataVal08.html#Font ) works - it zooms up, then back down to whatever screen sizes are inserted in the code. The only issue is the selected cell needs to be placed center screen, and remain there after a selection is made from the dropdown list. Can someone modify this code to make that happen?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim lZoom As Long
Dim lZoomDV As Long
Dim lDVType As Long
lZoom = 100
lZoomDV = 120
lDVType = 0

Application.EnableEvents = False
On Error Resume Next
lDVType = Target.Validation.Type

On Error GoTo errHandler
If lDVType <> 3 Then
With ActiveWindow
If .Zoom <> lZoom Then
.Zoom = lZoom
End If
End With
Else
With ActiveWindow
If .Zoom <> lZoomDV Then
.Zoom = lZoomDV
End If
End With
End If

exitHandler:
Application.EnableEvents = True
Exit Sub
errHandler:
GoTo exitHandler
End Sub
Reply With Quote