View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
AK9955 AK9955 is offline
external usenet poster
 
Posts: 8
Default Help with Macro - Make Dropdown List Temporarily Wider

Sorry I'm not a Programmer, so would appreciate your help with the following
macro I pulled from the contextures.com site (thanks to Bob).

Using below macro I was able to make ONE dropdown list temporarily wider.
Hooray. However, when I tried to make another dropdown list (within same
worksheet) temporarily wider, I was at a loss as to how to edit the code.
Tried & tried and I'm tired! Can someone edit below macro to include ANOTHER
DROPDOWN LIST (i.e. column) so I can figure out how its done.

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

Thanks so much, Anna.