Word Document Properties


Part II: Learning the Ropes



Download 8,82 Mb.
Pdf ko'rish
bet120/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   116   117   118   119   120   121   122   123   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Part II: Learning the Ropes 
11_046500 ch06.qxp 12/5/06 5:35 PM Page 134


Explicit
.) You can rely on VBA to find most variable typos when you add
this simple statement to your code. In fact, this statement should become a
standard part of every program that you create.
You can easily miss some of the subtle aids to locating syntax errors if you
don’t view carefully enough the tasks that the Integrated Development
Environment (IDE) performs. The balloon help shown in Figure 6-1 for the
MsgBox
function provides a cue that you could miss. VBA displays the bal-
loon help shown in the figure only when it recognizes the function name that
you type. When you don’t see the balloon help, it’s a cue that VBA doesn’t
recognize the function name and that you need to look at your code.
Unfortunately, this feature works only where VBA normally displays balloon
help — it doesn’t work when you type property names.
No matter what you do, a few syntax errors can slip by and cause bugs in
your program. You can look at the errors for hours and not actually see them
because you’ve worked with the code for so long. Asking someone else to
look at your code often helps because that person isn’t familiar with the
code. Make sure that you ask someone with the same level of programming
skills that you have (or better) to ensure that they understand your code.
Syntax errors also include errors in 
logic
(the construction of expressions in
your program). You can create a loop that processes the loop structure state-
ments once too often or not often enough. An 
If...Then
statement can use
an expression that works most of the time but isn’t quite right, so it doesn’t
produce the correct result all the time. Code with logic errors runs because
VBA doesn’t know that the expression is incorrect. The only way to find this
kind of syntax error is to debug the program. See the upcoming “Time for a
Bug Hunt” section for details.
Understanding compile errors
The VBA 
compiler
is actually a syntax checker. Unlike compilers used by
other languages, the VBA compiler doesn’t produce a freestanding module
that you can execute outside the Office environment. VBA uses the compiler
Balloon help

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   116   117   118   119   120   121   122   123   ...   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