Word Document Properties


Chapter 9: Working with Arrays and Collections



Download 8,82 Mb.
Pdf ko'rish
bet182/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   178   179   180   181   182   183   184   185   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Chapter 9: Working with Arrays and Collections
15_046500 ch09.qxp 12/5/06 5:36 PM Page 219


You should notice something interesting about the relationship between col-
lections and objects. Microsoft usually uses an 
s
at the end of the name to
denote a collection, such as the 
Drives
and 
Fields
collections.
The balloon help that you see when you type an object name normally con-
tains methods and properties for that object. It can also contain other
objects and collections. When you look through the list of items, anything
plural is normally a collection.
You see another clue when you double-click a property and then press F1 to
display help. VBA help not only tells you that the item is a collection, but usu-
ally also displays a hierarchical chart to show where the collection fits within
the object hierarchy and what types of items the collection can contain.
The Debugger can also help you ferret out collections. The Watches window,
shown in Figure 9-1, shows how the 
CurrentData Recordset
object holds
the 
Fields
collection, which contains multiple 
Field
objects. (Type
CurrentData.Fields
in the Expression field of the Add Watch dialog box to
obtain the view shown in Figure 9-1.) You can click the plus sign next to each
item to see each field and its current content. Look especially in the Type
column, where you can see the data type used for each item in the collection.
Another place to acquaint yourself with collections is in the Object Browser.
The Help file is useful only when you know what you’re looking for. The
Debugger is also problematic because you have to build something to see
what it contains. The Object Browser is different. When you know what you
need but not what to call it, you can select the library in question and browse.
Figure 9-2 shows the DAO library used for the example in the preceding
“Adding keyed data to the collection” section. This figure shows three collec-
tions and the objects that they contain: 
Errors

Fields
, and 
Groups
. When
you find something interesting, highlight it, and then press F1. When you
know what you’re looking for, help can be useful.

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   178   179   180   181   182   183   184   185   ...   207




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish