Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [VB6] Renaming a ListBox Item?
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Shaun Dreclin




PostPosted: Wed Aug 22, 2007 6:36 am   Post subject: [VB6] Renaming a ListBox Item?

Pretty straightforward. Is there a way to rename an item in a list box?
Sponsor
Sponsor
Sponsor
sponsor
Aziz




PostPosted: Wed Aug 22, 2007 8:21 am   Post subject: 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




PostPosted: Wed Aug 22, 2007 9:57 am   Post subject: 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.

code:
lstbox.AddItem "cool dude"
Aziz




PostPosted: Wed Aug 22, 2007 10:00 am   Post subject: RE:[VB6] Renaming a ListBox Item?

Sad 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




PostPosted: Wed Aug 22, 2007 12:07 pm   Post subject: Re: [VB6] Renaming a ListBox Item?

cool dude @ Wed Aug 22, 2007 9:57 am wrote:
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.

code:
lstbox.AddItem "cool dude"


I know how to add an item, I want to know how to rename one that's already there Razz

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




PostPosted: Wed Aug 22, 2007 12:25 pm   Post subject: RE:[VB6] Renaming a ListBox Item?

Nows a good of a time as any Smile 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




PostPosted: Wed Aug 22, 2007 6:51 pm   Post subject: Re: RE:[VB6] Renaming a ListBox Item?

Aziz @ Wed Aug 22, 2007 1:25 pm wrote:
Nows a good of a time as any Smile to learn.

Oh lord. I sound like wtd.


wtd would never advocate learning VB. Rolling Eyes
Nick




PostPosted: Wed Aug 22, 2007 8:13 pm   Post subject: 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
Sponsor
Sponsor
Sponsor
sponsor
Aziz




PostPosted: Thu Aug 23, 2007 8:06 am   Post subject: 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).
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: