Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selected Values in Listboxes Disappearing

Status
Not open for further replies.

EliseFreedman

Programmer
Dec 6, 2002
470
GB
Hi there

I am having a bit of bother with the listboxes in my spreadsheet.

The top half of my spreadsheet contains a list of risks. At a particular point in time, only some of those risks will be
current whilst others are not applicable. I have got code to
hide the non applicable rows (rows 19-49).This works ok.
Code:
Dim Cell As Range
For Each Cell In Range("e19:e49")
If Cell.Value = "No" Then
Cell.EntireRow.Hidden = True
End If
Next

My problem occurs with the lower half of the spreadsheet where
I have two multiselect listboxes(for highlighting future risks)
I can select from them ok but then when the worksheet is
activated and the relevant rows are hidden, the previously
selected choices in the listboxes disappear.

Is there any way that i can hide the rows in the upper part of
the spreadsheet whilst still retaining the users selected
choices in the listboxes

 



Elsie,

need more info.

What is the row reference for the listbox?

What kind of ListBox control?

What version Excel?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
The Listboxes are in rows 62 - 78

The listbox control is from the control toolbox and is directly
on the spreadsheet rather than in a userform or anything.

We are on Excel 2003
 


I was asking how the listbox was loaded? is there a reference or is it loaded via VBA code?

I don't see why hiding rows would at all affect the list selections.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top