![]() |
Can I overtype a listbox item
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 |
Can I overtype a listbox item
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 |
Can I overtype a listbox item
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 |
Can I overtype a listbox item
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 |
Can I overtype a listbox item
Here is a sample using a ComboBox from the Controls ToolBar and using
a UserForm Control http://sites.google.com/site/davesex...attredirects=0 |
All times are GMT +1. The time now is 10:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com