Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help with Macro - Make Dropdown List Temporarily Wider
The key is the fourth line. The code looks for column #4 (column D ). Lets
say we want the code to work on both column D and column J. Instead of: If Target.Column = 4 Then use: If Target.Column = 4 OR Target.Column = 10 Then -- Gary''s Student - gsnu200717 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help with Macro - Make Dropdown List Temporarily Wider
Thanks Gary, I understand what your saying. However, what if I want the
column widths to be different for my lists? I wouldn't use an OR statement, would I? "Gary''s Student" wrote: The key is the fourth line. The code looks for column #4 (column D ). Lets say we want the code to work on both column D and column J. Instead of: If Target.Column = 4 Then use: If Target.Column = 4 OR Target.Column = 10 Then -- Gary''s Student - gsnu200717 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Making data validation drop down list wider | Excel Discussion (Misc queries) | |||
How to make fx field wider? | Excel Discussion (Misc queries) | |||
Procedure to make a dropdown list larger so it's easier to read | Excel Discussion (Misc queries) | |||
Make input in one column determine dropdown list in another. | Excel Discussion (Misc queries) | |||
How to make an input in one column determine dropdown list in anot | Excel Worksheet Functions |