Word Document Properties


Chapter 4: Storing and Modifying Information



Download 8,82 Mb.
Pdf ko'rish
bet101/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   97   98   99   100   101   102   103   104   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Chapter 4: Storing and Modifying Information
09_046500 ch04.qxp 12/5/06 5:54 PM Page 105


Working with other formatting functions
VBA provides four custom formatting functions: 
FormatNumber
,
FormatDateTime

FormatCurrency
, and 
FormatPercent
. These 
functions don’t do anything that you can’t do with the 
Format
function. The
reasons why some VBA users rely on these functions is that their names make
clearer the purpose of the formatting and using them requires less typing.
All four functions return a string, just like the 
Format
function. The only
input that you must provide is the expression that you want formatted. The
default settings return a formatting string that relies on the regional settings
that the user has set for the computer. You can override these settings by
specifying the optional arguments provided for each function.
Working with Operators
Operators determine how VBA works with two variables and what result it
produces. The examples in this chapter use operators to add numbers and
concatenate
(add) strings. In both cases, your code uses the + operator to
perform the task. However, the result differs. When you’re using numbers,
the result is a summation, such as 
1 + 2 = 3
. When you’re using strings,
the result is a concatenation, such as 
Hello + World = Hello World
.
VBA groups operators into four areas:
Arithmetic:
Operators that perform math operations, such as addition
(
+
), subtraction (
-
), division (
/
), and multiplication (
*
)
Comparison:
Operators such as less than (
<
), greater than (
>
), and
equal (
=
) that compare two values and produce a Boolean result

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   97   98   99   100   101   102   103   104   ...   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