LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #18   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Resetting ListBox1.ListIndex to -1 after user selection

Just move code into the userform activate. I have sen tyou workbook

Regards


Anthony
"Hans" wrote in message
...
On Aug 22, 7:04 pm, "Anthony" wrote:
Private Sub CommandButton1_Click()

Me.ListBox1.ListIndex = -1

End Sub

I have sent you a workbook.

This is code attached to a button on the userform.

Regards

Anthony

"Hans" wrote in message

...
On Aug 22, 6:48 pm, "Anthony" wrote:



Is the listbox on the worksheet or is it on a user form?


If on a work sheet, set the input cell reference and all you would do
then
is clear the reference.


e.g A1 = input cell


User selects an itemfrom list


A1= the selected line number


To clear selected line clear A1


Regards


Anthony


Thanks Anthony,

No, the listbox is on a userform.


Hello Anthony,

You are right. That works if you put it in the code of a command
button on the userform. It is a solution but not really as it should
work I believe. :-)


 
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
Want to add a user defined selection marcia2026 Excel Programming 3 August 4th 08 09:46 PM
User selection from a chart Nathan Smith Excel Programming 1 January 29th 08 03:52 AM
Userform - Populate Listbox2 based on selection in Listbox1 miker1999[_16_] Excel Programming 0 April 29th 04 04:38 AM
User selection Samir[_2_] Excel Programming 3 January 7th 04 03:06 PM
(Worksheet)Listbox1.additem = (Form)Listbox1.value ?? Tom Ogilvy Excel Programming 0 September 2nd 03 07:36 PM


All times are GMT +1. The time now is 09:48 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"