[AccessD] PMT and PPMT

Hale, Jim Jim.Hale at FleetPride.com
Tue Sep 13 14:34:21 CDT 2005


FYI here is how you can call Excel functions from Access:
Two caveats- Not all Excel functions can be accessed (I believe there is a
list of the valid functions in help). Second, an instance of Excel is
launched so I would be judious in calling functions this way. It can be like
using a bazooka on a fly (although flies here in Tx sometimes require one)

Jim Hale

Function irrExample() As Double
'Under tools references check the Microsoft excel 8.0 library
Dim appExcel As Excel.Application
Set appExcel = Excel.Application

irrExample = appExcel.WorksheetFunction.irr(Cashflow)

appExcel.Quit
Set appExcel = Nothing
MsgBox irrExample 'show the answer
End Function

Function Cashflow() As Variant
Dim intI As Integer, arrCashflow(24) As Variant

 '****** The following loop generates the values for the IRR calculation
        'you probably will want to fill the arrCashflow array from a table
    For intI = 1 To 24
       arrCashflow(intI) = 1000
    Next
       arrCashflow(0) = -20000 'set the initial cash outflow
       Cashflow = arrCashflow
 '******
End Function

-----Original Message-----
From: Lonnie Johnson [mailto:prodevmg at yahoo.com]
Sent: Tuesday, September 13, 2005 12:05 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] PMT and PPMT


Sorry Stuart,
 
I didn't even see them on the list. Thanks. Duh!

Stuart McLachlan <stuart at lexacorp.com.pg> wrote:
On 12 Sep 2005 at 18:53, Lonnie Johnson wrote:

> Does anyone know how to convert or duplicate Excel's PMT and PPMT loan
functions in MS Access?
> 

How about using the PMT() and PPMT functions :-)

They are in at least A2K and above at least and IIRC, they were in A97.




-- 
Stuart

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.


More information about the AccessD mailing list