I use data validation to select data entries. The width of the list box is
different in some worksheets. How do I control the width to expand when there
is longer text in the list range?
I use data validation to select data entries. The width of the list box is
different in some worksheets. How do I control the width to expand when there
is longer text in the list range?
That box's width is determined by the width of the cell that has the
Data|Validation.
Can you widen the column?
Can you (ugh) merge some cells?
Davy Lawson wrote:
>
> I use data validation to select data entries. The width of the list box is
> different in some worksheets. How do I control the width to expand when there
> is longer text in the list range?
--
Dave Peterson
Or, if you can use programming, you could use a SelectionChange event to
temporarily widen the column. There are some instructions here:
http://www.contextures.com/xlDataVal08.html#Wider
Dave Peterson wrote:
> That box's width is determined by the width of the cell that has the
> Data|Validation.
>
> Can you widen the column?
>
> Can you (ugh) merge some cells?
>
> Davy Lawson wrote:
>
>>I use data validation to select data entries. The width of the list box is
>>different in some worksheets. How do I control the width to expand when there
>>is longer text in the list range?
>
>
--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html
I went to the contextures link and used the code as it directed, however, I get an error message now.
If I go any of the cells in that column, the VBA code page opens up and I get the following message:
Compile Error:
Ambigous name detected: Worksheet _SelectionChange
and the following vb code is hightlighted:
Private Sub Worksheet_SelectionChange(ByVal Target As Range
The code I have used is:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 13 Then
Target.Columns.ColumnWidth = 40
Else
Columns(13).ColumnWidth = 20
End If
End Sub
Anyhelp would be appreciated.
Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.
If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.
Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
your box is full so my message to you will not go through.
Where do you make a new post?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks