Word Document Properties


Part II: Learning the Ropes



Download 8,82 Mb.
Pdf ko'rish
bet96/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   92   93   94   95   96   97   98   99   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Part II: Learning the Ropes 
09_046500 ch04.qxp 12/5/06 5:54 PM Page 100


vbOKOnly, _
“Mortgage Output”
‘ Calculate the monthly payments required to build
‘ a savings account to 120000.
Rate = 0.0025 ‘ 3 Percent divided by 12
Months
Periods = 240 ‘ 20 years
PresentValue = -5000 ‘ $5,000 current savings.
FutureValue = 120000 ‘ $120,000.00 savings in 20
years
MsgBox CStr(Pmt(Rate, Periods, PresentValue, _
FutureValue)), _
vbOKOnly, _
“Savings Output”
End Sub
The code shows two examples. The first determines the minimum amount
that you would need to pay each month on a 5-year loan of $120,000.00 com-
pounded at a 6 percent interest rate. The second example shows how much
you would need to pay into a savings account each month to have $120,000.00
saved at 20 years when starting with $5,000 in the account and a 3 percent
interest rate from the bank. Running the example shows that the mortgage pay-
ment is $2,319.94 per month and that the savings rate is $337.79 per month.
Using date and time values
Tracking time and date in your program can be important. Client contact entries
in Access usually require the date that the client was last contacted. A spread-
sheet might require dates for each entry in a ledger. It’s helpful to include
dates in Word documents so that you know the last time that someone
accessed or changed it. You might need to know how long a task takes or
have an indicator of when time has elapsed.
Both date and time variables rely on the 
Date
data type. This data type con-
tains both date and time information. However, you can separate the informa-
tion as needed. You can also assign date and time independently to the variable
by using the 
Date
and 
Time
functions or assign both date and time by using
the 
Now
function. These are the same functions that you use to perform this
task within a spreadsheet.
As with a spreadsheet, you can work with time values individually. Listing
4-13 demonstrates various time functions. Notice that you can control indi-
vidual elements, making it easy to change just what you need.
101

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   92   93   94   95   96   97   98   99   ...   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