Word Document Properties



Download 8,82 Mb.
Pdf ko'rish
bet105/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   101   102   103   104   105   106   107   108   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Consistency:
The decision is made by using the same criteria and in the
same manner every time.
Speed:
A computer can make static decisions faster than humans can.
However, the decision must be the same every time, and the decision
must have the same answer set every time.
112
Part II: Learning the Ropes 
10_046500 ch05.qxp 12/5/06 5:35 PM Page 112


Complexity:
Requesting that the computer make static decisions can
reduce program complexity. Fewer decisions translate into ease of use
for most people.
All forms of 
If...Then
statements can use any expression that equates to
a Boolean value, including a variable of the 
Boolean
data type. The term
expression
refers to any equation or variable that VBA can interpret as a
means of determining when it should perform the tasks within the
If...Then
structure. The expression 
2 > 1
is true, so VBA would perform
the tasks within the 
If...Then
structure. You can also use variables for an
expression such as 
A = B
. Anything that equates to a Boolean value can be
used as an expression for the 
If...Then
statement.
Using the If...Then statement
The 
If...Then
statement is the simplest form of decision-making code. This
statement tells VBA to perform a task if a condition is true. If the condition
isn’t true, VBA ignores the statements within the 
If...Then
structure.
The example in this section checks the highlighted text in a document. To
test the 
If...Then
statement in VBA, create a Word document. Type 
Hello
,
press Enter, and then type 
Goodbye
. Then double-click the word 
Hello
to
select the text. The code in Listing 5-1 shows how a simple 
If...Then
statement works. (You can find the source code for this example on the
Dummies.com site at 
http://www.dummies.com/go/vbafd5e
.)

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   101   102   103   104   105   106   107   108   ...   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