View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JimRWR JimRWR is offline
external usenet poster
 
Posts: 18
Default Selecting listbox items programmatically by using stored parameter

Hi.

My application needs to be able to recall reports defined and saved by the
user (so he doesn't have to go back to the form and make selections all over
again). The save module works fine. However, when I try to select listbox
items based on those selected by the user, I get an error (and no items get
selected). Here's the relevant code, the purpose of which is to take the
value in the activecell, find it in the listbox and select it in the listbox.

For j = 0 To frmGraphingCenter.lbxSummaryMeasure.ListCount - 1
For k = 0 To TitleRec - 1
If ActiveCell.Offset(k, 0).Value < Empty Then
If ActiveCell.Offset(k, 0).Value =
frmGraphingCenter.lbxSummaryMeasure.List(j) Then
frmGraphingCenter.lbxSummaryMeasure.List(j).Select ed = True
End If
End If
Next
Next

Line six causes the 'Object Required' error. Any ideas?

Thanks!