Hi All,
I am trying to temprorarily resize a column to allow the dropdown menu to be fully visible. The following code allows me to do this, but with problems. When I select a column, the width automatically changes (as desired). However, If I select the same column again the width returns to its normal size. Any help would be greatly appreciated.
Sub Worksheet_SelectionChange(ByVal Target As Range)
Static Col As Long
If Target.Count > 1 Then Exit Sub
If Target.Column >= 27 Then
Target.Columns.ColumnWidth = 20
End If
If Col >= 27 Then
Columns(Col).ColumnWidth = 5
End If
Col = Target.Column
End Sub
Cheers
Bookmarks