PC Review


Reply
Thread Tools Rate Thread

Delete Button Code!

 
 
Bob
Guest
Posts: n/a
 
      17th May 2006


I want to put a delete button next to a listbox called "tbStableDescription"
What code would i use to delete its contents on that form?


Thanks in advance.........Bob Vance


 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2F5bmUtaW4tTWFuY2hlc3Rlcg==?=
Guest
Posts: n/a
 
      17th May 2006
To use the Key Press function (you could put it behind any other funtion if
you wanted

Private Sub tbStableDescription_KeyPress(KeyAscii As Integer)
If KeyCode = vbKeyDelete Then
On Error Resume Next
List1.RemoveItem List1.ListIndex
End If
End Sub


Hope this helps

--
Wayne




"Bob" wrote:

>
>
> I want to put a delete button next to a listbox called "tbStableDescription"
> What code would i use to delete its contents on that form?
>
>
> Thanks in advance.........Bob Vance
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying Delete Button code Mishanya Microsoft Access Getting Started 12 30th Dec 2008 12:11 PM
Modifying Delete Button code Mishanya Microsoft Access Form Coding 1 25th Dec 2008 10:56 AM
Modifying Delete Button code Mishanya Microsoft Access Form Coding 1 24th Dec 2008 11:50 AM
Delete Button Code needed ! Bob Microsoft Access 7 8th May 2007 06:02 AM
Programatically Delete command button and code. =?Utf-8?B?RG9jQnJvd24=?= Microsoft Excel Programming 3 20th Jan 2007 01:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:59 PM.