Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Unselect data in a Listbox

Hi,

once a user has selected a row of data contained in a
listbox, how do I unselect and clear the highlight without
reloading the data into the listbox...??

Thks....Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Unselect data in a Listbox

I put two listboxes on a userform. Listbox1 was set for multiselect and
listbox2 could only have one selection:

Option Explicit
Private Sub CommandButton1_Click()
Dim iCtr As Long

For iCtr = 0 To Me.ListBox1.ListCount - 1
Me.ListBox1.Selected(iCtr) = False
Next iCtr

End Sub
Private Sub CommandButton2_Click()
Me.ListBox2.ListIndex = -1
End Sub



Chris Gorham wrote:

Hi,

once a user has selected a row of data contained in a
listbox, how do I unselect and clear the highlight without
reloading the data into the listbox...??

Thks....Chris


--

Dave Peterson

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
unselect cells tgi Excel Discussion (Misc queries) 1 October 1st 09 03:21 AM
unselect cells tgi Excel Discussion (Misc queries) 2 October 1st 09 01:39 AM
How can I select one checkbox and have it unselect other ones? Jake Excel Worksheet Functions 1 October 10th 05 03:39 AM
Unselect Option Box Jon Excel Discussion (Misc queries) 1 May 18th 05 01:02 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 10:14 AM.

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

About Us

"It's about Microsoft Excel"