Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Make Validation List Wider - Excel 2003

I found the following post from 2006 and the code works great, but it is for
one column, how do I alter the code for columns C through AX so the temporary
widening happens in each column?

"You cannot word-wrap a list for DV.

What you can do is use event code to make the list wider when you click on the
drop-down.

See Debra Dalgeish's site for code.

http://www.contextures.on.ca/xlDataVal08.html#Wider"


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default Make Validation List Wider - Excel 2003

You can change the target columns:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Column = 3 And Target.Column <= 50 Then
Target.Columns.ColumnWidth = 20
Else
Columns(4).ColumnWidth = 5
End If
End Sub


cmarion wrote:
I found the following post from 2006 and the code works great, but it is for
one column, how do I alter the code for columns C through AX so the temporary
widening happens in each column?

"You cannot word-wrap a list for DV.

What you can do is use event code to make the list wider when you click on the
drop-down.

See Debra Dalgeish's site for code.

http://www.contextures.on.ca/xlDataVal08.html#Wider"




--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog: http://blog.contextures.com

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Make Validation List Wider - Excel 2003

This works for expanding the column width, but does not return the column to
the smaller size when no longer selected.

Thank you.

"Debra Dalgleish" wrote:

You can change the target columns:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Column = 3 And Target.Column <= 50 Then
Target.Columns.ColumnWidth = 20
Else
Columns(4).ColumnWidth = 5
End If
End Sub


cmarion wrote:
I found the following post from 2006 and the code works great, but it is for
one column, how do I alter the code for columns C through AX so the temporary
widening happens in each column?

"You cannot word-wrap a list for DV.

What you can do is use event code to make the list wider when you click on the
drop-down.

See Debra Dalgeish's site for code.

http://www.contextures.on.ca/xlDataVal08.html#Wider"




--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog: http://blog.contextures.com


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default Make Validation List Wider - Excel 2003

This will reset all the affected columns to the same width.
If you need them different widths you could specify in the code.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Columns("C:AX").ColumnWidth = 5
If Target.Column = 3 And Target.Column <= 50 Then
Target.Columns.ColumnWidth = 20
Else
Columns("C:AX").ColumnWidth = 5
End If
End Sub


cmarion wrote:
This works for expanding the column width, but does not return the column to
the smaller size when no longer selected.

Thank you.

"Debra Dalgleish" wrote:


You can change the target columns:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Column = 3 And Target.Column <= 50 Then
Target.Columns.ColumnWidth = 20
Else
Columns(4).ColumnWidth = 5
End If
End Sub


cmarion wrote:

I found the following post from 2006 and the code works great, but it is for
one column, how do I alter the code for columns C through AX so the temporary
widening happens in each column?

"You cannot word-wrap a list for DV.

What you can do is use event code to make the list wider when you click on the
drop-down.

See Debra Dalgeish's site for code.

http://www.contextures.on.ca/xlDataVal08.html#Wider"




--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog: http://blog.contextures.com





--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog: http://blog.contextures.com

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Make Validation List Wider - Excel 2003

Wonderful, thank you for your help.

"Debra Dalgleish" wrote:

This will reset all the affected columns to the same width.
If you need them different widths you could specify in the code.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Columns("C:AX").ColumnWidth = 5
If Target.Column = 3 And Target.Column <= 50 Then
Target.Columns.ColumnWidth = 20
Else
Columns("C:AX").ColumnWidth = 5
End If
End Sub


cmarion wrote:
This works for expanding the column width, but does not return the column to
the smaller size when no longer selected.

Thank you.

"Debra Dalgleish" wrote:


You can change the target columns:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Column = 3 And Target.Column <= 50 Then
Target.Columns.ColumnWidth = 20
Else
Columns(4).ColumnWidth = 5
End If
End Sub


cmarion wrote:

I found the following post from 2006 and the code works great, but it is for
one column, how do I alter the code for columns C through AX so the temporary
widening happens in each column?

"You cannot word-wrap a list for DV.

What you can do is use event code to make the list wider when you click on the
drop-down.

See Debra Dalgeish's site for code.

http://www.contextures.on.ca/xlDataVal08.html#Wider"




--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog: http://blog.contextures.com





--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog: http://blog.contextures.com


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation - Temporarily Make dropdown list wider Alison Excel Discussion (Misc queries) 1 February 14th 08 12:13 PM
How do I make the drop-down portion of a list wider than the cell? jtjlindsey Excel Discussion (Misc queries) 2 January 6th 08 11:14 PM
Make Dropdown List Temporarily Wider & Same Width for Multiple Col AK9955 Excel Discussion (Misc queries) 1 November 1st 07 08:46 AM
Help with Macro - Make Dropdown List Temporarily Wider AK9955 Excel Discussion (Misc queries) 2 April 27th 07 03:16 PM
Making data validation drop down list wider Steve E Excel Discussion (Misc queries) 5 August 15th 06 05:15 PM


All times are GMT +1. The time now is 10:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"