Word Document Properties



Download 8,82 Mb.
Pdf ko'rish
bet188/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   184   185   186   187   188   189   190   191   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

6. Right-click the 
Persons
entry in the Project Explorer window, and
then choose Remove Persons from the context menu that appears.
VBA asks whether you want to export Persons before you remove it.
7. Click No.
VBA removes the class module.
8. Right-click anywhere in the Project Explorer window, and then
choose Import File from the context menu that appears.
VBA displays the Import File dialog box.
9. Highlight the 
Persons.cls
file and then click Open.
VBA imports the updated file. It appears that nothing has changed. The
code looks the same as before. However, the unseen 
Attribute
entry
has changed.
10. Open Object Browser and view the updated 
Persons
class.
You notice that 
Item
is now the default property for this class.
Developing the test program
The test program in Listing 9-9 is similar to the one used in the earlier section
“Adding keyed data to the collection” (refer to Listing 9-6). You can find it in
the source code as 
DisplayContacts2
(on the Dummies.com site at
http://www.dummies.com/go/vbafd5e
). The new example in Listing 9-9
still begins by creating variables, and it opens the same recordset.
Listing 9-9
Updating the Key Data Collection Example
‘ Create the collection from the data.
While Not CurrentData.EOF
‘ Define a new element.
Set Individual = New Person
‘ Get the information and place it in the user
‘ data type.
Individual.Name = _
CurrentData.Fields(“Name”).Value
Individual.Telephone = _
CurrentData.Fields(“Telephone”).Value
Individual.LastContact = _
CurrentData.Fields(“LastContact”).Value
‘ Add the information to the collection.
ContactList.Add Individual, Individual.Name
(continued)
227

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   184   185   186   187   188   189   190   191   ...   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