gordonc068
New Member
- Joined
- Feb 8, 2016
- Messages
- 12
Hi all, need some help as I do not know VBA. I have a form that my company uses to hire new folks. One of the cells is a Organization selection drop-down. Because of what other items are in that column I cannot re-size the whole column but want the drop-down to be wider when it is selected because you can't read your options at the normal width (ie, all you see is 8 options that read "Sale Lake Cit... Salt Lake Cit..). Each option starts with the branch location, then the line of business. So I have do some searching and came across the select case. I used it and it worked 1/2 correct. When I first used it the cell did grow when selected, but once unselected it did not return to the original width.
Any help would be greatly appreciated.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$G$30" Then
Select Case Target.Address
Case "$G$30"
Target.Columns.Columnwidth = 35
Case Else
Range("G:G").Columnwidth = 8.86
End Select
Application.ScreenUpdating = True
End If
End Sub
Any help would be greatly appreciated.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$G$30" Then
Select Case Target.Address
Case "$G$30"
Target.Columns.Columnwidth = 35
Case Else
Range("G:G").Columnwidth = 8.86
End Select
Application.ScreenUpdating = True
End If
End Sub