Forum

Function not workin...
 
Notifications
Clear all

Function not working - based on previous function that does work

4 Posts
2 Users
0 Reactions
96 Views
(@dmdavala)
Posts: 28
Eminent Member
Topic starter
 

I created a function that works.

 

I then copied it and added some more variables.  The function does not get past reading in the variables.

 

Here is the beginning of the code.

==============================

Public Function AnnuityJS(age, spage, defAge, MortTblName As Integer, SpMorTblName As Integer, JSPct As Variant, Seg_1 As Variant, Seg_2 As Variant, Seg_3 As Variant, IntOnlyDef As Boolean)

Debug.Print age
Debug.Print spage
Debug.Print defAge
Debug.Print MortTblName
Debug.Print SpMortTblName
Debug.Print JSPct

=========================

Debug print will show the variable listed except for SpMorTblName.

 
Posted : 21/01/2022 10:41 am
(@debaser)
Posts: 838
Member Moderator
 

Your input variable is called SpMorTblName, not SpMortTblName

 
Posted : 21/01/2022 12:04 pm
(@dmdavala)
Posts: 28
Eminent Member
Topic starter
 

Duh on me.

I thought I had checked all of those.

 
Posted : 21/01/2022 3:49 pm
(@debaser)
Posts: 838
Member Moderator
 

Option Explicit is your friend. 😉

 
Posted : 22/01/2022 5:00 am
Share: