Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

VS 2010 [RESOLVED] How to make a MsgBox Popup for each 5th Item within a ListBox?

$
0
0
First of all I wish you all Merry Christmas and Happy Hollidays.

I recently started a Project with Speech Recognition. I am using 2 ListBoxes. One for Curse Words that I dont want to include in my project. And the other ListBox is for each time a user curses then the Curse word will be added in there! I want to warn users with a Message Box for each 5th Item or 5th Curse Word they use within my 2nd Listbox, named CountBox.

I am right now using the method below:

Code:

If CountBox.Items.Count = 5 Then
MsgBox("Please stop Cursing!")
End If

But how can I create a single code that will send a warning for each and every 5th Item instead of the code I am using.

Thanks a lot in advance!

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>