Vb.Net - CheckedListBox - Check If Any Item Has Been Checked

Vb.Net - CheckedListBox - Check If Any Item Has Been Checked

isocam
Collaborator Collaborator
794 Views
2 Replies
Message 1 of 3

Vb.Net - CheckedListBox - Check If Any Item Has Been Checked

isocam
Collaborator
Collaborator

Can anybody help?

 

I am writing a Vb.Net application for use with Autodesk Inventor, but, I cannot get the following code to work.

 

For Counter = 0 To CheckedListBox1.Items.Count - 1
       If CheckedListBox1.GetItemChecked(Counter) Then
               MsgBox("A CHECKED ITEM HAS BEEN FOUND")

 

              Exit For
       End If
Next

 

I have a CheckedListBox populated with various items. All I am trying to do is to determine if any item has been checked.

 

I have searched the Internet for the solution but I have not found anything to resolve the problem.

 

Many thanks in advance!

 

Kind Regards

 

Darren

0 Likes
795 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor

And what do you want after you know the checked items?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 3

bradeneuropeArthur
Mentor
Mentor
 For Each item As Object In CheckedListBox1.CheckedItems
            MsgBox(item)
 Next

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes