Article View: pl.comp.lang.vbasic
Article #104457Re: Creating a collection of ActiveX objects
From: Janusz Rychter
Date: Wed, 03 Feb 2010 13:22
Date: Wed, 03 Feb 2010 13:22
34 lines
2488 bytes
2488 bytes
The simplest way is to select control and then use COPY/PASTE. When control is pasted, you will be asked if you like to create control array. Click YES and repeat COPY/PASTE operation as many times as you need to. Check INDEX property of the control, you will need to use this property in order to access each control in the array. Another way is to drop control on the form and in properties set INDEX to 0 (zero). Now COPY/PASTE the control and VB will generate array automatically for you. You can refer to each control in the array using something like this (I'm not sure if your gauge control has Visible property): Dim i as integer For i = 0 to CircleGauge1.Count - 1 CircleGauge1(i).Visible = Fasle Next i jr On Feb 2, 7:58 am, avi <avi...@bezeqint.net.il> wrote: > Hello, > > Certainly a basic question > > I have a form with 20 objects of the same type (an ActiveX gauge > called CircleGauge1, CircleGauge2,....). In order to refer to them I > understand that I have to define them as a collection (or array?) > > How do I accomplish that? > > Thanks for your patience > Avi
Technical Details
Message-ID:
<daa575be-add4-4f29-991e-923c4b2697f4@z41g2000yqz.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!plix.pl!newsfeed1.plix.pl!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!news2.euro.net!feeder.news-service.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!postnews.google.com!z41g2000yqz.googlegroups.com!not-for-mailReferences:
<126fdae9-4986-4cfb-864f-db1838dffb03@c4g2000yqa.googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!plix.pl!newsfeed1.plix.pl!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!news2.euro.net!feeder.news-service.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!postnews.google.com!z41g2000yqz.googlegroups.com!not-for-mail From: Janusz Rychter <najyer@hotmail.com> Newsgroups: pl.comp.lang.vbasic Subject: Re: Creating a collection of ActiveX objects Date: Wed, 3 Feb 2010 05:22:57 -0800 (PST) Organization: http://groups.google.com Lines: 35 Message-ID: <daa575be-add4-4f29-991e-923c4b2697f4@z41g2000yqz.googlegroups.com> References: <126fdae9-4986-4cfb-864f-db1838dffb03@c4g2000yqa.googlegroups.com> NNTP-Posting-Host: 70.54.12.51 Mime-Version: 1.0 X-Trace: posting.google.com 1265203377 25218 127.0.0.1 (3 Feb 2010 13:22:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 3 Feb 2010 13:22:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z41g2000yqz.googlegroups.com; posting-host=70.54.12.51; posting-account=mUWrkwoAAACCgah6ceXbZIsjKiFWP67A User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10,gzip(gfe),gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit