'Usage:
' Dim xx As Double
' If cpi.calculate(100, 1980, 2018, xx) Then
' MsgBox xx
' Else
' MsgBox cpi.errMsg
' End If
' - or -
' MsgBox cpi.calculate_(100, 1980, 2018) '0 on error
demo wrapper is a command line app which can run as console program or standard windows app
At first glance, I thought this was an amortization/depreciation routine, and that possibly some of the built-in VB6 financial functions would do the same thing. You almost never hear those financial functions mentioned (FV, PV, Rate, etc.).
However, then I downloaded and took at look at the project. And you're actually using estimated inflation/deflation rates from 1667 through 2028, and that's sort of cool.
I suppose I'll still make a couple of suggestions though: 1) It'd be cool if you'd develop a bit of a GUI, possibly with starting year and ending year (and starting year could be either earlier or later than ending year). That way, we could see the value of a dollar at any point (past or future) estimated at any other year (past or future).
And 2) it seems that the CBO just estimates an inflation rate of 2.4% after 2023. I'm wondering why, for anything after 2023, you didn't just let it go on to infinity, using that 2.4% estimate for all future years.
Those seem that they would be nice improvements to this interesting project.
Take Care,
Elroy
EDIT1: Also, just as another idea, VB6 has the nice feature whereby you can dimension an array to any arbitrary range you want. As such, it might be nice if you dimmed your rates array as: Private rates(1666 to 2028) As Double. That would just be a bit more in the spirit of self-documenting code. And also, then you could use LBound() and UBound() to check for valid bounds. Just thinking out-loud.
Last edited by Elroy; Feb 8th, 2019 at 09:37 AM.
Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.
there are a lot of interesting things it could be used for, I made it so I could wire the class into an app I am writing to explore house sale prices trying to gauge the market and current home prices
I just did a quick direct port of the original JS those are good ideas for improvements. It does still show its js roots a bit. The original JS calculator actually has 5 or 6 different inflation calculations possible using different data sets that could also be ported over and included into this one.
Outside of the main app I found I wanted to be able to just quickly run a calculation here and there, so I am compiling this to my windows directory as a console app so its really quick to fire up at anytime from a console window with the arguments i need without extra clicks.
I have been meaning to find an amortization calculator too but haven't done it in vb yet would be great to find/create.
If anyone wants to make improvements or upgrades on this run with it and feel free to post back to this thread.
Its just a corollary to what i was working on and thought I would share.
also thanks for pointing me to the built in financial functions. started looking at those this morning and wow, after 20yrs I never even knew they existed lol. vb6 is a gift that keeps on giving
Agh that is a great find thanks for sharing. Trick digs up more awesome stuff lol
Originally Posted by Bonnie West
The trick has shared an undocumented .VBP section tip that enables a Standard EXE project to be compiled as a console application (or standard DLL) without requiring post-processing of the EXE or use of IDE add-ins that hook into the build process:
→ The Comprehensive Guide to Cloud Computing
A complete overview of Cloud Computing focused on what you need to know, from selecting a platform to choosing a cloud vendor.