Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm trying to make a combo box that allows me to display more than rows of data in the drop down list. I copied/pasted macro from sampl file listed at www.contextures.on.ca/excelfiles.html#DataVal, but can't get combo box to "behave" properly in my spreadsheet. I name the combo box "TempCombo" to match the macro name. When I double clic on the cell containing my datavalidation list, the macro initiates th combo box, but the box doesn't insert the "LinkedCell" an "ListFillRange" like it's supposed to. Anyone try to use this before Thanks -- Tom Kolkmeie ----------------------------------------------------------------------- Tom Kolkmeier's Profile: http://www.excelforum.com/member.php...fo&userid=1546 View this thread: http://www.excelforum.com/showthread.php?threadid=27050 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The sample workbook uses a list on the same worksheet. If you're using a
named range on a different sheet, you could add a reference to that sheet. For example: '=========================== Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim str As String Dim cboTemp As OLEObject Dim ws As Worksheet Dim wsList As Worksheet Set ws = ActiveSheet Set wsList = Sheets("Sheet2") Cancel = True Set cboTemp = ws.OLEObjects("TempCombo") On Error Resume Next With cboTemp .ListFillRange = "" .LinkedCell = "" .Visible = False End With On Error GoTo errHandler If Target.Validation.Type = 3 Then Application.EnableEvents = False str = Target.Validation.Formula1 str = Right(str, Len(str) - 1) With cboTemp .Visible = True .Left = Target.Left .Top = Target.Top .Width = Target.Width + 5 .Height = Target.Height + 5 .ListFillRange = wsList.Range(str).Name .LinkedCell = Target.Address End With cboTemp.Activate End If errHandler: Application.EnableEvents = True Exit Sub End Sub '=========================== Tom Kolkmeier wrote: I'm trying to make a combo box that allows me to display more than 8 rows of data in the drop down list. I copied/pasted macro from sample file listed at www.contextures.on.ca/excelfiles.html#DataVal, but I can't get combo box to "behave" properly in my spreadsheet. I named the combo box "TempCombo" to match the macro name. When I double click on the cell containing my datavalidation list, the macro initiates the combo box, but the box doesn't insert the "LinkedCell" and "ListFillRange" like it's supposed to. Anyone try to use this before? Thanks! -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Validation "List" - Setting length of list shown | Excel Discussion (Misc queries) | |||
Data Validation List Length | Excel Worksheet Functions | |||
Validation (Drop down list vs simple text length validation) | Excel Programming | |||
Validation (Drop down list vs simple text length validation) | Excel Programming | |||
Validation (Drop down list vs simple text length validation) | Excel Programming |