Word Document Properties


Chapter 8: Object-Oriented Programming



Download 8,82 Mb.
Pdf ko'rish
bet165/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   161   162   163   164   165   166   167   168   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Chapter 8: Object-Oriented Programming
14_046500 ch08.qxp 12/5/06 5:36 PM Page 195


Listing 8-5 
(continued)
UseIcon = vbInformation
‘ Display only the OK button.
UseButtons = vbOKOnly
‘ Make the first button the default button.
UseDefault = vbDefaultButton1
‘ Ensure the message box is application modal. The
user
‘ must clear the message box before doing anything
else
‘ with the application.
UseModal = vbApplicationModal
‘ Don’t display a help button.
UseHelpButton = False
‘ It’s not essential that the message box always
appear
‘ in the foreground.
UseForeground = False
‘ Left-align the message box text.
UseRightAlignment = False
‘ Display the text in left-to-right order.
UseRightToLeft = False
Initialize the special icon, but don’t load a
picture.
Set SpecialIcon = New Image
End Sub
The code shows that initialization is simply the task of assigning values to
every variable. However, the code also demonstrates some subtleties that
you should consider. The 
MsgBox
function has only one required input: a
prompt. The code defines a value for 
ThePrompt
because it’s a required
input. The 
Show
method works even when you simply instantiate the object
and make the method call.
The title, help filename, and help context are all optional 
MsgBox
function
arguments, so the code doesn’t define a value for them. The empty string
ensures that the variable is usable, but nothing else.
Variables such as 
UseIcon
must use one of the enumerated values. In this
case, the initialization process sets the variable to use the default value that
the 
MsgBox
function uses or the value that you use most often. For example,
the 
MsgBox
function doesn’t require that you provide an icon, but the object
does provide one for the sake of onscreen appearance.
196

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   161   162   163   164   165   166   167   168   ...   207




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.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