Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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
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
Selecting all items in a Listbox??? Neily[_3_] Excel Programming 3 March 28th 07 02:40 PM
Selecting multiple items on Listbox Rahul_Uk Excel Programming 2 April 20th 06 05:29 PM
1. Selecting multiple items from drop listbox kurb Excel Programming 0 October 16th 04 09:01 PM
Selecting Multiple items in ListBox Dave Peterson[_3_] Excel Programming 0 August 26th 04 01:33 AM
Selecting multiple items and columns from ListBox TK Excel Programming 0 August 25th 04 01:19 AM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"