View Single Post
  #1   Report Post  
Invoice Invoice is offline
Junior Member
 
Posts: 6
Default Dropdown frustration

I've got a lot of dropdowns, specifically AG37:IV37, but I've got to keep the width of each of these columns small for the user. That results in the dropdown choices getting cut off.

At Contextures.com, there are a bunch of good options, but none suit me exactly. I don't want to change the zoom temporarily when the list is selected because that's really jumpy.

The following code at Contextures looks great, but there's a problem: it's too limited. It allows a single column (D:D in this case) containing a dropdown to expand in width temporarily as it is selected.

Is there any way this can be made more general, so than all my columns (AG:IV) are included?

Thanks.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Column = 4 Then
Target.Columns.ColumnWidth = 20
Else
Columns(4).ColumnWidth = 5
End If
End Sub