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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats your pleasure, Mr Cotton...The Listbox..

Status
Not open for further replies.

basepointdesignz

Programmer
Jul 23, 2002
566
GB
Hi,

Could someone please explain to me or point me in the direction of the following VBA realted question. Pretty please..

I have a working program I have written that cycles through all layouts in the drawing and updates various attributes within the titleblock from user chosen values. Basically, its a Revision Editor, which when a construction drawing is revised up, this program allows the user to add the revision notes, change the drawing status (ie: for approval / construction / as built etc) and it automatically increments the revision code of the drawing. Thsi all works perfectly *chuffed smug look* lol.....

but what i want it to do now is have a listbox displaying all the layouts in the drawing, with checkbox (in the listbox) so the user can select the required layouts to update, rather than do the whole drawing, which might not be needed..

I can do the whole listbox thing, but its how i get the program to compare whats been checked in the listbox to the layouts in the drawing and just do it to those layouts in where i'm stuck, so any advice would be brilliant..



Cheers,

Paul
basepointdesignzltd..
P4 3.0Ghz / 2GB RAM
XP Pro SP2
Sapphire X1950 512MB Dual-DVi Graphics Card..
 
Hi Paul,

Here ya go:

Code:
Private Sub CommandButton1_Click()
  For iCnt = 0 To Me.ListBox1.ListCount
   If ListBox1.Selected(iCnt) = True Then
     Debug.Print ListBox1.List(iCnt)
   End If
  Next iCnt
End Sub

HTH
Todd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top