D
dspitler
I used Debra Dalgleish's website to Make the Dropdown List Temporarily Wider
(http://www.contextures.com/xlDataVal08.html) and I put the following code in
my sheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 3 Then
Target.Columns.ColumnWidth = 30
Else
Columns(3).ColumnWidth = 7
End If
End Sub
This works great for the whole column, but I only want the column to change
size when I select cells that have drop down lists in them. The way it
currently is set up is that when I click on any cell that is in column 3, the
column expands to 30. Is there a way to set up the code so that the column
width temporarily changes only when I select a cell with a drop down list?
I'm new to VB, so please be easy on me.
Thank you!
(http://www.contextures.com/xlDataVal08.html) and I put the following code in
my sheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 3 Then
Target.Columns.ColumnWidth = 30
Else
Columns(3).ColumnWidth = 7
End If
End Sub
This works great for the whole column, but I only want the column to change
size when I select cells that have drop down lists in them. The way it
currently is set up is that when I click on any cell that is in column 3, the
column expands to 30. Is there a way to set up the code so that the column
width temporarily changes only when I select a cell with a drop down list?
I'm new to VB, so please be easy on me.
Thank you!