Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Visual Basic 6 Black Book
(Publisher: The Coriolis Group)
Author(s): Steven Holzner
ISBN: 1576102831
Publication Date: 08/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Handling Financial Data

You finally landed that big programming job at MegaMegaBank—congratulations! But now there’s some trouble—just what is an “internal rate of return” anyway? Visual Basic to the rescue—there are 13 Visual Basic functions devoted entirely to financial work, and they appear in Table 3.12.

Table 3.12 The Visual Basic financial functions.
To Do This Use This
Calculate depreciation DDB, SLN, SYD
Calculate future value FV
Calculate interest rate Rate
Calculate internal rate of return IRR, MIRR
Calculate number of periods NPer
Calculate payments IPmt, Pmt, PPmt
Calculate present value NPV, PV


TIP:  If you’re going to be working with financial data, checkout the Visual Basic currency data in “Declaring Variables” earlier in this chapter. The currency data type can hold values from -922,337,203,685,477.5808 to 922,337,203,685,477.5807.

Ending A Program At Any Time

Our last topic in this chapter will be about ending programs. There are times when you want to end a program without any further ado—for example, to make an Exit menu item active. How do you do that?

You use the End statement. This statement stops execution of your program—but note that it does so immediately, which means that no Unload() or similar event handling functions are called. End just brings the program to an end, which is what it should do.


TIP:  The Stop statement is similar to End, except that it puts the program in a break state. Executing a Stop statement, therefore, is just like running into a breakpoint—the debugger will come up.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.