Word Document Properties


Figure 6-6: The Watches window tracks variables and expressions. 152 Part II: Learning the Ropes



Download 8,82 Mb.
Pdf ko'rish
bet135/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   131   132   133   134   135   136   137   138   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Figure 6-6:
The
Watches
window
tracks
variables
and
expressions.
152
Part II: Learning the Ropes 
11_046500 ch06.qxp 12/5/06 5:35 PM Page 152


Adding a new watch expression
The easiest way to add a watch expression is to highlight the expression in
your code and then drag it to the Watches window. VBA automatically enters
all the correct information for you — you don’t need to do anything but look
at the value. You can also highlight the expression and click the Quick Watch
button on the toolbar. When you use this method, you see a Quick Watch
dialog box that tells you about the new watch expression. Click Add to add
the new watch or click Cancel to change your mind.
Using the Add Watch window
A watch expression might be more complex than a single variable or even an
expression in your code. Look at the first expression shown earlier, in Figure
6-6. This expression doesn’t come from the code — I created it by using the
Add Watch dialog box. The Add Watch dialog box (see Figure 6-7) gives you
full control over the expression. To display the Add Watch dialog box, high-
light any expression in your code, right-click the selection, and then choose
Add Watch from the context menu that appears.
You can modify an expression by changing the content of the Expression
field. For example, as you can see in Figure 6-6, I first highlighted the
FreeSpace
entry in the code and then added the 
CStr
part of the expres-
sion. You can also use the Add Watch dialog box to change the context of a
watch expression. It might help to have access to global variables in every
procedure and not just in the current procedure. A common local variable
could also appear in more than one 
Sub
or 
Function
.
Figure 6-7:
The Add
Watch
dialog box
helps you
modify
existing
expressions
or create
new ones.
153

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   131   132   133   134   135   136   137   138   ...   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