Hi,
I have a textfield where the user enters a language name.
I then have the code below which I thought would check all the existing values in my listbox and then compare them against user entered data in the textfield.
The code produces no errors - but still allows me to create an unwanted duplicate language name.
I presume this is due to i returning an integer?
I cannot work out how to fetch the value of column1 of i - and compare that against the user entered string
[code]// LOOP THROUGH THE LanguageListbox
for i As Integer= myWindow.LanguageListbox.ListCount - 1 DownTo 0
// IF NEW NAME ALREADY EXISTS
if myWindow.LanguageListbox.(i) = NewLanguageNameField.text then
// DISPLAY THE ERROR MSGBOX
MsgBox(“This language already exists - please rename and then retry!”)
end if
Thanks Beatrix - my comments do normally explain what the code does AND why it’s doing it.
What you see is simply quick initial comments.
Plus - what people seem to forget is that what may look like obvious code to a professional, is not so clear to the novice.
Therefore, comments which may look like they are restating the code - are actually making it easier for me to see at a glance what is happening
Thanks for the link - I will take a look anyway
I appreciate ALL tips, so thank you!