Word Document Properties


Table 2-1 Special Program Names That Automatically Execute



Download 8,82 Mb.
Pdf ko'rish
bet51/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   47   48   49   50   51   52   53   54   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Table 2-1
Special Program Names That Automatically Execute
Name
When It Runs
AutoClose
When the user closes a document
AutoExec
When the application starts
AutoExit
When the application ends
AutoNew
When the user creates a new document
AutoOpen
When the user opens an existing document
46
Part I: An Overview of VBA 
06_046500 ch02.qxp 12/5/06 5:33 PM Page 46


Using Help to Your Advantage —
Stealing Microsoft’s Code
This book contains a lot of code — most of it very practical code that you
can use today to improve your Microsoft Office experience. Even with as
much as this book has to offer, you still won’t find examples of every function
that VBA has to offer. Fortunately, Microsoft does provide you with lots of
sample code in the help files. In fact, you can even copy this code right out of
the help file and use it for your next program.
To see the sample code associated with a function, open the help page to
that function. You might want to highlight one of the 
MsgBox
entries in the
sample code for this chapter and then press F1. In Chapter 1, I describe some
of the information on this page. However, notice the links at the top of the
page. (Newer versions of Office include all the information inline, so you
won’t see the links.) Three of the most common links are See Also, Example,
and Specifics. Click Example or scroll down to the bottom of the help page to
see an example of the 
MsgBox
function, like the one shown in Figure 2-10.
Figure 2-10:
Copy any of
the code
that you
need from
the help file
to reduce
program-
ming time
and effort.
47
Chapter 2: Your First VBA Program
06_046500 ch02.qxp 12/5/06 5:33 PM Page 47


This code is a little complex given what you know from this chapter, but in
this book I show you how to read and understand it. More importantly, you
can highlight the code, right-click it, and then choose Copy from the context
menu that appears. Paste the code into the Code window for your VBA pro-
gram to use it.
48

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   47   48   49   50   51   52   53   54   ...   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