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

Hi all,

I have a simple question:

I display a listbox and let a user select one line of the list which
is then stored in a cell on a worksheet. The problem is that next time
the list is displayed the last selected line is selected and cannot be
picked again. Is there a way to set the .ListIndex to -1 so nothing is
selected when the list is displayed?

The application is this:

I have a grid of cells for a calender month. If a user clicks on a
cell the Worksheet SelectionChange procedure is executed. There I chek
via Intersec whether the cell clicked is in the grid. If so I display
the form with the possible entries in a listbox. The user picks one
line, the valued is stored in the cell by the ListBox1_Clicked
procedure and the form is hidden (UserForm1.Hide)

If the user clicks another cell the same procedure is executed but he
can pick any line but the one he picked previously.

Anyhelp is greatly appreciated.

Thanks in advance
Hans
 
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 12:04 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"