
-----------------------------------
Shaun Dreclin
Wed Aug 22, 2007 6:36 am

[VB6] Renaming a ListBox Item?
-----------------------------------
Pretty straightforward. Is there a way to rename an item in a list box?

-----------------------------------
Aziz
Wed Aug 22, 2007 8:21 am

RE:[VB6] Renaming a ListBox Item?
-----------------------------------
First off, why are you using VB6 and not VB .NET? VisualBasic .NET 2005 Express Edition is a free download from Microsoft.

Second, I'm not sure of VB6, but in .NET you would have to edit the Items property of the ListBox. Something like lstBox.Items(i).Text = "Foo"

-----------------------------------
cool dude
Wed Aug 22, 2007 9:57 am

Re: [VB6] Renaming a ListBox Item?
-----------------------------------
Aziz i'm pretty sure most schools still use Visual Basic 6.0 instead of .NET. To add an item to a list in visual basic 6.0 is straightforward. 

lstbox.AddItem "cool dude"

-----------------------------------
Aziz
Wed Aug 22, 2007 10:00 am

RE:[VB6] Renaming a ListBox Item?
-----------------------------------
:( Well they shouldn't. At least my college used .NET. Bad enough they were teaching VB anyways. At least I get Java classes this year.

Anyways, thanks for the info cool dude!

-----------------------------------
Shaun Dreclin
Wed Aug 22, 2007 12:07 pm

Re: [VB6] Renaming a ListBox Item?
-----------------------------------
Aziz i'm pretty sure most schools still use Visual Basic 6.0 instead of .NET. To add an item to a list in visual basic 6.0 is straightforward. 

lstbox.AddItem "cool dude"

I know how to add an item, I want to know how to rename one that's already there :P

And I'm using VB6 instead of .NET because my friend doesnt know .NET, and hes the one who offered to teach me.
(I would have asked him, but hes gone on a camping trip lol)

-----------------------------------
Aziz
Wed Aug 22, 2007 12:25 pm

RE:[VB6] Renaming a ListBox Item?
-----------------------------------
Nows a good of a time as any :) to learn.

Oh lord. I sound like wtd.

Either way, there's lots of books and online articles. You can download Express Edition directly from the MS website. Then YOU can start teaching your friend!


google "change listbox item vb6"

-----------------------------------
Mr. T
Wed Aug 22, 2007 6:51 pm

Re: RE:[VB6] Renaming a ListBox Item?
-----------------------------------
Nows a good of a time as any :) to learn.

Oh lord. I sound like wtd.


wtd would never advocate learning VB.  :roll:

-----------------------------------
Nick
Wed Aug 22, 2007 8:13 pm

RE:[VB6] Renaming a ListBox Item?
-----------------------------------
lmao we meatn that wtd would say that nows a good time to learn as any time not in the same context (being VB) but in general wtd would say this

-----------------------------------
Aziz
Thu Aug 23, 2007 8:06 am

RE:[VB6] Renaming a ListBox Item?
-----------------------------------
I could've went farther and said to just learn C# if you're going to be in the MS world. Or, in the true spirit of wtd, learn some obscure crazy functional objective literal language called JHairball.

BTW, Shaun, see if the MSDN (Microsoft Developer Network).
