Hey guys,now I have a listbox I need to add in it name of day and time and the program read each item in listbox auto and if the first item = my pc day and time show message and so on...
But I got dat error when the program reach the last item give me that error
And when I click on start button it doesnot wait until the first item = my pc day and time it go on the each item until reach the last give me that error

But It work in visual basic 100%

Any help in my codes

My codes:


In button add items to listbox code:

Listbox5.items.add(textbox1.text + textbox2.text)

in Button1 start timer code:


in Timer1 code:

if (listbox5.text= datetime.now.tostring("ddd") + datetime.now.tolongtime())

Listbox.selectedindex +=1

Recommended Answers

All 2 Replies

The error message indicates that the SelectedIndex is higher than the number of items in the listbox.

So what should I do ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.