Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default 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


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
move item from one listbox to another listbox steve Excel Programming 6 March 6th 08 05:02 PM
Remove Item from Listbox by Item Name Randy[_2_] Excel Programming 3 September 19th 07 02:36 PM
Double click item in Listbox to select item and close Listbox GusEvans Excel Programming 3 July 19th 07 12:36 PM
Overtype mode Bernie Deitrick Excel Programming 0 December 8th 06 03:20 PM
The value of a ListBox Item TK Excel Programming 2 August 20th 04 06:17 AM


All times are GMT +1. The time now is 02:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"