Hank Moore
Member
Hi, novice user here....
Is there a way to make the dropdown box in AD41 large enough to view all of the content ONLY when selecting the dropdown? The box would then return to normal size when another cell is selected. I found the code below online but don't understand how it works - when I increase the values for intZoom & intZoomDV, the size of the box doesn't change.
Also, is there a way to not have to add the = when I've made my selection to make a formula? Is there a way to just get the value of the equation populate the cell?
thank you,
Hank
Is there a way to make the dropdown box in AD41 large enough to view all of the content ONLY when selecting the dropdown? The box would then return to normal size when another cell is selected. I found the code below online but don't understand how it works - when I increase the values for intZoom & intZoomDV, the size of the box doesn't change.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rngDV As Range
Dim intZoom As Integer
Dim intZoomDV As Integer
intZoom = 60
intZoomDV = 125
ActiveSheet.Unprotect
Application.EnableEvents = False
On Error Resume Next
Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)
On Error GoTo errHandler
If rngDV Is Nothing Then GoTo errHandler
If Intersect(Target, rngDV) Is Nothing Then
With ActiveWindow
If .Zoom <> intZoom Then
.Zoom = intZoom
End If
End With
Else
With ActiveWindow
If .Zoom <> intZoomDV Then
.Zoom = intZoomDV
End If
End With
End If
exitHandler:
Application.EnableEvents = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Exit Sub
errHandler:
GoTo exitHandler
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
thank you,
Hank
Attachments
Last edited by a moderator: