Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a listbox in which I use .AddItem to present the user w/ several
choices, from which he can select one. Is it possible to allow him to over type the first item in the box so that he could supple thy text if he didn't like the options I presented? I appreciate your help, -John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() John;218336 Wrote: I have a listbox in which I use .AddItem to present the user w/ several choices, from which he can select one. Is it possible to allow him to over type the first item in the box so that he could supple thy text if he didn't like the options I presented? I appreciate your help, -John I doubt it, with some code you can type new items in a combobox and then the new item will be added to the combobox list, check out Dave Peterson's code here, it will of course need some manipulating to fit your requirements. http://tinyurl.com/bsywln -- Stringer ------------------------------------------------------------------------ Stringer's Profile: http://www.thecodecage.com/forumz/member.php?userid=117 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=60014 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thx for response. switched to a ComboBox and now I can type in another name.
"Stringer" wrote: John;218336 Wrote: I have a listbox in which I use .AddItem to present the user w/ several choices, from which he can select one. Is it possible to allow him to over type the first item in the box so that he could supple thy text if he didn't like the options I presented? I appreciate your help, -John I doubt it, with some code you can type new items in a combobox and then the new item will be added to the combobox list, check out Dave Peterson's code here, it will of course need some manipulating to fit your requirements. http://tinyurl.com/bsywln -- Stringer ------------------------------------------------------------------------ Stringer's Profile: http://www.thecodecage.com/forumz/member.php?userid=117 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=60014 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Here's some added code to reference with if the combobox is from the controls toolbar and in the worksheet. Code: -------------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) Const WS_RANGE As String = "D17" If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Range("E17").Select End With End If ComboBox1.List = _ Worksheets("Customer List").Range("A1") _ .CurrentRegion.Columns("A").Value End Sub Private Sub ComboBox1_LostFocus() Dim Resp As Long Dim DestCell As Range If BlkProc = True Then Exit Sub With Me.ComboBox1 If .Value = "" Then 'do nothing Else If .ListIndex = -1 Then Resp = MsgBox(Prompt:="This is a new Customer Name, " _ & "Do you want to save it? " & .Value, _ Buttons:=vbYesNo) If Resp = vbYes Then Worksheets("Customer List").Select End If End If End If End With ActiveCell.Offset(1, 0).Range("A1").Select ActiveCell.Offset(-1, 0).Range("A1").Select End Sub -------------------- -- Stringer ------------------------------------------------------------------------ Stringer's Profile: http://www.thecodecage.com/forumz/member.php?userid=117 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=60014 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is a sample using a ComboBox from the Controls ToolBar and using
a UserForm Control http://sites.google.com/site/davesex...attredirects=0 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move item from one listbox to another listbox | Excel Programming | |||
Remove Item from Listbox by Item Name | Excel Programming | |||
Double click item in Listbox to select item and close Listbox | Excel Programming | |||
Overtype mode | Excel Programming | |||
The value of a ListBox Item | Excel Programming |