Home All Groups Group Topic Archive Search About
Author
20 Mar 2006 6:48 PM
Rem.Intellegare
Ok I feel like an idiot, not just for using VB6(it's a class), but also
because I'm not sure how to clear a list in VB6.  The list has a
variable amount of objects in it and I need to clear the whole thing
with one click.  Any ideas?

Thanks

Author
20 Mar 2006 7:09 PM
Ken Halter
<Rem.Intelleg***@gmail.com> wrote in message
news:1142880513.830454.317970@t31g2000cwb.googlegroups.com...
> Ok I feel like an idiot, not just for using VB6(it's a class), but also
> because I'm not sure how to clear a list in VB6.  The list has a
> variable amount of objects in it and I need to clear the whole thing
> with one click.  Any ideas?
>
> Thanks

First of all, it might be a good idea to not slam a product in the group
that supports the product and has 100's of dedicated users trying to answer
newbie questions.

Secondly, place code in the click event to do the work. Third in the list
would be to select the listbox on your form and hit F1 to see all available
methods/properties and events. The list of Methods is the one you'll want.

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Author
20 Mar 2006 7:13 PM
Veign
Fourth, Ask the teacher.  That's why he gets paid the big bucks.

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--


Show quoteHide quote
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:%23cwYcHFTGHA.5108@TK2MSFTNGP11.phx.gbl...
> <Rem.Intelleg***@gmail.com> wrote in message
> news:1142880513.830454.317970@t31g2000cwb.googlegroups.com...
>> Ok I feel like an idiot, not just for using VB6(it's a class), but also
>> because I'm not sure how to clear a list in VB6.  The list has a
>> variable amount of objects in it and I need to clear the whole thing
>> with one click.  Any ideas?
>>
>> Thanks
>
> First of all, it might be a good idea to not slam a product in the group
> that supports the product and has 100's of dedicated users trying to
> answer newbie questions.
>
> Secondly, place code in the click event to do the work. Third in the list
> would be to select the listbox on your form and hit F1 to see all
> available methods/properties and events. The list of Methods is the one
> you'll want.
>
> --
> Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
> DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
>
Author
20 Mar 2006 7:41 PM
ralph
"Veign" wrote:

> Fourth, Ask the teacher.  That's why he gets paid the big bucks.
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> Veign's Blog
> http://www.veign.com/blog
> --
>
<snipped>

Teacher! Big bucks!

LOL, Ha, ha, ha, ... cough, cough, sputter...,
wipe eyes, clear throat....

Ha, ha, good one.

-ralph
Author
21 Mar 2006 4:56 AM
Bob O`Bob
ralph wrote:
Show quoteHide quote
>
> "Veign" wrote:
>
>> Fourth, Ask the teacher.  That's why he gets paid the big bucks.
>>
>> --
>> Chris Hanscom - Microsoft MVP (VB)
>> Veign's Resource Center
>> http://www.veign.com/vrc_main.asp
>> Veign's Blog
>> http://www.veign.com/blog
>> --
>>
> <snipped>
>
> Teacher! Big bucks!
>
> LOL, Ha, ha, ha, ... cough, cough, sputter...,
> wipe eyes, clear throat....
>
> Ha, ha, good one.
>
> -ralph
>



Somewhere in my garage I have a rolled up poster depicting a One Dollar bill.
It's more than two feet across, yet not negotiable for much of anything at all.





    Bob
--
yeah, I was even a *VB* teacher for a while
Author
20 Mar 2006 7:37 PM
Mike Williams
<Rem.Intelleg***@gmail.com> wrote in message
news:1142880513.830454.317970@t31g2000cwb.googlegroups.com...

> Ok I feel like an idiot, not just for using VB6(it's a class),
> but also because I'm not sure how to clear a list in VB6.

I would suggest that you feel like an idiot because you are an idiot.

Mike
Author
21 Mar 2006 12:50 PM
George Bashore
Try this with a list box and a command button.

Option Explicit
Dim i As Integer

Private Sub Command1_Click()
For i = List1.ListCount - 1 To 0 Step -1
List1.RemoveItem i
Next i
End Sub

Private Sub Form_Load()
For i = 1 To 20
List1.AddItem i
Next i
End Sub




<Rem.Intelleg***@gmail.com> wrote in message
Show quoteHide quote
news:1142880513.830454.317970@t31g2000cwb.googlegroups.com...
> Ok I feel like an idiot, not just for using VB6(it's a class), but also
> because I'm not sure how to clear a list in VB6.  The list has a
> variable amount of objects in it and I need to clear the whole thing
> with one click.  Any ideas?
>
> Thanks
>
Author
21 Mar 2006 8:17 PM
Kat
Alright thanks I'll try that.  I didn't slam VB I slammed VB6.  VB.Net
is actually a very nice user system.
Author
21 Mar 2006 8:36 PM
Mike Williams
"Kat" <Rem.Intelleg***@gmail.com> wrote in message
news:1142972246.986273.236870@z34g2000cwc.googlegroups.com...

> Alright thanks I'll try that.  I didn't slam VB I slammed VB6.

How can you possibly "slam" VB6 when you obviously know bugger all about it!
You've even just foolishly agreed to try some "loop through the List using
RemoveItem" code when you could simply do List1.Clear! How can you possibly
know whether VB6 is any good or not if you don't even know how to use it!

Mike