Word Document Properties

 Type a name for your certificate in the Your Certificate’s Name field

Download 8,82 Mb.
Pdf ko'rish
Hajmi8,82 Mb.
1   ...   169   170   171   172   173   174   175   176   ...   207
VBA For Dummies 5th Ed.pdf ( PDFDrive )

2. Type a name for your certificate in the Your Certificate’s Name field.
3. Click OK.
You see a success message.
4. Click OK.
The test certificate is ready to use.
Chapter 8: Object-Oriented Programming
14_046500 ch08.qxp 12/5/06 5:36 PM Page 203

Applying the digital signature to a project
After you have a digital signature, you need to apply it to your project. Use
the following steps to sign your creation:
1. In the VBA Integrated Development Environment (IDE), choose

Digital Signature.
You see a Digital Signature dialog box, like the one shown in Figure 8-2.
2. Click the Choose button.
You see a Select Certificate dialog box.
3. Highlight a certificate in the list and then click OK.
VBA signs the target project using your certificate.
4. Click OK to close the Digital Signature dialog box.
Figure 8-2:
Verify the
status of
your project.
Part III: Expanding Your VBA Horizons 
14_046500 ch08.qxp 12/5/06 5:36 PM Page 204

Chapter 9
Working with Arrays 
and Collections
In This Chapter
Using arrays within a program
Using collections within a program
Creating new data types
Defining collections within a program
o this point in the book, all the data types you’ve used have one thing in
common — they store a single data element. When you create an integer,
it holds a single number. Placing a new number within the integer removes
the old value. However, the real world doesn’t work this way. A computer can
have more than one disk drive. Your contact database contains more than
one name. A mailbox can contain more than one piece of mail. You need a
method of storing more than one piece of information in a single variable so
that you can model the real world in your programs. VBA provides two meth-
ods of doing this: arrays and collections.
provide a way for your programs to store more than one item in a
single container. Think of the array as a large box with a bunch of small boxes
inside. Each small box can store a single value. You decide how many small
boxes the array can hold when you create the array. Use arrays when you
need to store a number of related items of the same data type.
always relate to a group or series of objects that are combined in
a single container. In most cases, a main object contains one or more sub-
objects. For example, an Excel 
object contains a 
collection, and a 
object contains a 
collection. The
can contain one or more 
, and an individual
can contain one or more 
. A Word 
object can
contain a 
collection. Microsoft Office and many third-party
products are packed with object collections that you can access from VBA.
15_046500 ch09.qxp 12/5/06 5:36 PM Page 205

In this chapter, I also demonstrate how you can create your own data types.

data type
is a way to mark information so that you can understand it better.
The computer doesn’t care about data types. VBA uses data types to enforce
certain data behaviors, but it doesn’t really understand them. The use of a
data type is for your benefit so that you can understand the information
Using Arrays for Structured Storage
is a list of items. When you write a list of tasks to perform for the
day, you create an array. The piece of paper is a single container that holds a
number of strings, each of which is a task that you have to perform. Likewise,
you can create a single piece of paper in your VBA program — an array —
and use that array to hold multiple items.
Understanding array usage
You can define arrays by using several techniques. However, all these tech-
niques use the same basic approach. Listing 9-1 contains an example that
demonstrates the essential array usage process. (You can find the source
code for this example on the Dummies.com site at 

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   169   170   171   172   173   174   175   176   ...   207

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

    Bosh sahifa
davlat universiteti
ta’lim vazirligi
axborot texnologiyalari
zbekiston respublikasi
maxsus ta’lim
guruh talabasi
nomidagi toshkent
O’zbekiston respublikasi
o’rta maxsus
toshkent axborot
texnologiyalari universiteti
xorazmiy nomidagi
davlat pedagogika
rivojlantirish vazirligi
pedagogika instituti
Ўзбекистон республикаси
tashkil etish
haqida tushuncha
vazirligi muhammad
таълим вазирлиги
toshkent davlat
respublikasi axborot
O'zbekiston respublikasi
kommunikatsiyalarini rivojlantirish
махсус таълим
vazirligi toshkent
fanidan tayyorlagan
bilan ishlash
saqlash vazirligi
Toshkent davlat
Ishdan maqsad
fanidan mustaqil
sog'liqni saqlash
uzbekistan coronavirus
respublikasi sog'liqni
coronavirus covid
vazirligi koronavirus
covid vaccination
koronavirus covid
qarshi emlanganlik
risida sertifikat
sertifikat ministry
vaccination certificate
haqida umumiy
o’rta ta’lim
matematika fakulteti
fanlar fakulteti
pedagogika universiteti
ishlab chiqarish
moliya instituti
fanining predmeti