Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
seantera
 
Posts: n/a
Default Please Help!!! With Drop-down List


Is there any way to control how the dropdown list is displayed?
Specifically, I have a data validation list in a cell. The column it is
in is only 4 units wide, with the text aligned at 90 degrees
(vertically). The dropdown list displayed is also only 4 units wide,
and does not show enough characters of each list item. I've seen other
spreadsheets where the dropdown list is wider than the column, but it
seems to be somewhat random...

Is there any way to increase the size (or other properties) of the
dropdown list (apart from increasing the column width)?


--
seantera
------------------------------------------------------------------------
seantera's Profile: http://www.excelforum.com/member.php...o&userid=27294
View this thread: http://www.excelforum.com/showthread...hreadid=468401

  #2   Report Post  
hideki
 
Posts: n/a
Default


Hi seantera,

May be this is not the best solution but you can use this in the sheets
selection change event.

This assuming that your listbox is in the cell "E1". Please change to
suit yours. And you need to check at the VBE immidiate window to see
the correct name for your drop down list. Here I only have one drop
down list, so the name is "Drop Down 1).

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim s As Shape
Dim BtnWidth As Single
With ActiveCell
Select Case .Address(False, False)
Case "E1"
If .Validation.Type = xlValidateList Then
Set s = ActiveSheet.Shapes("Drop Down 1")
BtnWidth = s.Width - .Width
s.Width = 150
s.Left = .Left + .Width - s.Width + BtnWidth
Set s = Nothing
End If
End Select
End With
End Sub

Best regards,


--
hideki
------------------------------------------------------------------------
hideki's Profile: http://www.excelforum.com/member.php...o&userid=18903
View this thread: http://www.excelforum.com/showthread...hreadid=468401

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
can you make a drop down list in a drop down list? Sburlingham Excel Discussion (Misc queries) 18 October 12th 09 07:58 AM
changing value of a cell by selecting an item from a drop down list Bobby Mir Excel Worksheet Functions 6 June 8th 05 08:33 PM
Pull unique names for drop down list [email protected] Excel Discussion (Misc queries) 3 February 1st 05 10:23 PM
automatic color change in cells using a drop down list kennethwt Excel Worksheet Functions 1 January 21st 05 06:37 PM
Drop List Referencing Boony Excel Worksheet Functions 2 November 11th 04 11:42 AM


All times are GMT +1. The time now is 09:59 PM.

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

About Us

"It's about Microsoft Excel"