#1   Report Post  
GBH99
 
Posts: n/a
Default Drop Downs Menus

I am having difficulty making a drop down list for an excel cell, I don't
want it to filter, I need it to select pre-determined values. Can anyone help
  #2   Report Post  
tjtjjtjt
 
Posts: n/a
Default

Here are a few ways:
Use the Combo Box Control from the ControlToolbox.
Use the Combobox control from the Forms toolbar

It should be noted that these two Combo Boxes are NOT the same, and you may
want to check the Help Files on them. Also, they don't go directly into cells.
You could also:

Check out Data | Validation and set the Allow to List for the cell or cells
you want a list to appear in.

tj

"GBH99" wrote:

I am having difficulty making a drop down list for an excel cell, I don't
want it to filter, I need it to select pre-determined values. Can anyone help

  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
see:
http://www.contextures.com/xlDataVal01.html

--
Regards
Frank Kabel
Frankfurt, Germany

GBH99 wrote:
I am having difficulty making a drop down list for an excel cell, I
don't want it to filter, I need it to select pre-determined values.
Can anyone help



  #4   Report Post  
Max
 
Posts: n/a
Default

As mentioned by tjtjjtjt, think
data validation (DV) could be what you're after ..

Try Debra Dalgleish's nice coverage on DV at her:
http://www.contextures.com/xlDataVal01.html

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"GBH99" wrote in message
...
I am having difficulty making a drop down list for an excel cell, I don't
want it to filter, I need it to select pre-determined values. Can anyone

help


  #5   Report Post  
Ben McBen
 
Posts: n/a
Default

Hi

I have been achieving this via a right-click menu as per
below. "ColumnData.TradeDataItems" is simply an array of
values that contain all the values:

As well as creating the menu you have to firstly call this
function via the BeforeRightClick even:


Private Sub Worksheet_BeforeRightClick(ByVal Target As

'If statement - is this a good place to show the menu

Set rngRightClickTarget = Target
BuildValueChooser ColumnData

Else ' Make sure you delete any old menus
Application.CommandBars("Cell").Reset
Exit Sub
End If


End Sub

Which calls the below

Public Sub BuildValueChooser(ColumnData As clsColumnData)
Dim i As Long

Dim Mnu As Object

On Error Resume Next


Application.CommandBars("Cell").Reset



Set Mnu = Application.CommandBars("Cell").Controls.Add
(msoControlPopup, , , 1, True)

With Mnu
.Caption = "QuickSelect"
.Tag = "QuickSelect"
' .DescriptionText = "QuickSelect"
End With


With Mnu.Controls


For i = LBound(ColumnData.TradeDataItems) To UBound
(ColumnData.TradeDataItems)
With .Add(msoControlButton, , , i, True)
.Caption = ColumnData.TradeDataItems(i)
.Tag = ColumnData.TradeDataItems(i)
.DescriptionText = ColumnData.TradeDataItems
(i)
.OnAction = "'CustomSetData """ &
ColumnData.TradeDataItems(i) & """'"


If i = LBound(ColumnData.TradeDataItems)
Then .BeginGroup = True
End With


Next i


End With

End Sub



Then you need a handler for the "onaction"


Public Sub CustomSetData(DataToSet As Variant)

rngRightClickTarget.Value = DataToSet

End Sub



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
How do you create dual drop down menus in excel 2000? Phlashh Excel Discussion (Misc queries) 1 January 11th 05 08:56 PM
drop down menus in excel rowing coach Excel Discussion (Misc queries) 1 December 4th 04 12:25 AM
Filling drop down box Nick Excel Discussion (Misc queries) 0 November 25th 04 07:49 PM
how do you create drop down menus for individual cells in excel? Frosty1 Excel Worksheet Functions 2 November 15th 04 11:02 PM
Problem with Pivot Table Drop-Down Menus Mac Excel Worksheet Functions 4 November 7th 04 01:18 PM


All times are GMT +1. The time now is 08:57 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"