Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
placing a pull-down menu at a cell location automatically
Hi there,
I'm wanting to click on any cell in Excel and wanting a pull down menu to be positioned over that cell location, when I double click on that cell. The pull down menu has a list of values (text values), and once I select a text value from the pull down list, that value automatically appears in the cell, and the pull down menu then dissapears. How do I code this in visual basic? Cheers KEN |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
placing a pull-down menu at a cell location automatically
one way:
Put this in your worksheet code module: Option Explicit Public gOldActiveCell As Range Private Sub Worksheet_BeforeDoubleClick( _ ByVal Target As Excel.Range, Cancel As Boolean) With ActiveCell With .Validation .Delete .Add Type:=xlValidateList, _ AlertStyle:=xlValidAlertStop, _ Formula1:="txt1,txt2,txt3,txt4" .IgnoreBlank = True .InCellDropdown = True End With End With Cancel = True End Sub Private Sub Worksheet_SelectionChange( _ ByVal Target As Excel.Range) If Not gOldActiveCell Is Nothing Then _ gOldActiveCell.Validation.Delete Set gOldActiveCell = ActiveCell End Sub In article , "Ken Nysse" wrote: Hi there, I'm wanting to click on any cell in Excel and wanting a pull down menu to be positioned over that cell location, when I double click on that cell. The pull down menu has a list of values (text values), and once I select a text value from the pull down list, that value automatically appears in the cell, and the pull down menu then dissapears. How do I code this in visual basic? Cheers KEN |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
placing a pull-down menu at a cell location automatically
another way:
use Data/Validation. keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "J.E. McGimpsey" wrote: one way: snAp In article , "Ken Nysse" wrote: Hi there, I'm wanting to click on any cell in Excel and wanting a pull down menu to be positioned over that cell location, when I double click on that cell. The pull down menu has a list of values (text values), and once I select a text value from the pull down list, that value automatically appears in the cell, and the pull down menu then dissapears. How do I code this in visual basic? Cheers KEN |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
placing a pull-down menu at a cell location automatically
Note that unless you apply data validation to *every* cell in the
sheet, this can't meet the OP's requirement that the dropdown should appear when he clicks "on any cell", and doesn't meet at all the requirement that it appear "when I double click on that cell". In article , keepitcool wrote: another way: use Data/Validation. keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "J.E. McGimpsey" wrote: one way: snAp In article , "Ken Nysse" wrote: Hi there, I'm wanting to click on any cell in Excel and wanting a pull down menu to be positioned over that cell location, when I double click on that cell. The pull down menu has a list of values (text values), and once I select a text value from the pull down list, that value automatically appears in the cell, and the pull down menu then dissapears. How do I code this in visual basic? Cheers KEN |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
placing a pull-down menu at a cell location automatically
Instead of having a listbox drop down - is it possible to have a check
box drop down so the user can choose multiple values (seperated by a comma)? Thanks, Robin ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change cell contents when pull down menu choices change | Excel Worksheet Functions | |||
Auto pull 3 cells into 1 cell at different location? (Excel) | Excel Discussion (Misc queries) | |||
Placing a Command Button in a New Tool Menu | Excel Discussion (Misc queries) | |||
Excel pull down menu | Excel Worksheet Functions | |||
Pull Down Menu Bar | Excel Discussion (Misc queries) |