Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting listbox items programmatically by using stored parameter
Never mind! Solved the problem.
"JimRWR" wrote: 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting all items in a Listbox??? | Excel Programming | |||
Selecting multiple items on Listbox | Excel Programming | |||
1. Selecting multiple items from drop listbox | Excel Programming | |||
Selecting Multiple items in ListBox | Excel Programming | |||
Selecting multiple items and columns from ListBox | Excel Programming |