|
-
Jul 6th, 2000, 12:23 PM
#1
Thread Starter
New Member
I'm trying to create a function to be used in Excel, which calculates the death benefit for a member of a pension plan.
When I try calling the function from a subroutine procedure the debugger gives me the message "Expression too complex".
The following is the chunk of code that is giving me trouble:
*****************************
For i = 55 To 64
loopcalc2 = (lx(i, table_number) - lx(i + 1, table_number)) / lx(Age, table_number) * (loopcalc1 * AccBen * GLA(65 * 12, 60, table_number, interest_number, 1) + FiftyXS + HundredXS)
loopcalc3 = Ann(Age * 12, Age * 12 - 12, table_number, table_number, 1, 0.00000001, Age * 12, 180, 2, 180, interest_number, 1)
loopcalc4 = loopcalc2 * loopcalc3
loopcalc5 = loopcalc4 / GLA(i * 12, 180, table_number, interest_number, 1)
Post55Single = Post55Single + loopcalc5
Next
*****************************
As you can see, I've tried to break the expression up into smaller pieces, but VB still keeps stopping at the "loopcalc5..." line.
Note: lx, gla, & ann are functions from an add-in to Excel and VB that my company uses.
Could somebody give me some advice here?
Thanks alot!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|