pineisland99
Instructor
Hello All....
Please excuse if not in correct section.
Below is a macro I wrote which adds 1 point to my variable(strNewRate) when certain conditions are met.
This macro runs when 'save' is clicked on the application.
It is written in a macro editor that is part of the app.
The macro works - The problem is that I need my if then statement to run only once if my conditions are met.
As it is now, it will run again, and again, upon each click of the save button, and creates erroneous information.
How can I get my macro to either run once, or what change can I do to get an add-on to be added only once.
Thank You
'Adds 1 point to rate for No Cost loans
dim strNCost as string
dim strProg as string
dim strfix as string
dim strArm as string
dim strNewRate as single
strNcost = GetLoanData(10155)
strfix=GetLoanData(402)
strArm=GetLoanData(292)
strProg=GetLoanData(7074)
If strProg = "CFIX" and strNCost = "Yes" then
strNewRate=(Val(strFix) + 1)
SetLoanData 402, CStr(strNewRate)
end if
If strProg = "CARM" and strNCost = "Yes" then
strNewRate = (Val(strARM) + 1)
SetLoanData 292, CStr(strNewRate)
end if
Please excuse if not in correct section.
Below is a macro I wrote which adds 1 point to my variable(strNewRate) when certain conditions are met.
This macro runs when 'save' is clicked on the application.
It is written in a macro editor that is part of the app.
The macro works - The problem is that I need my if then statement to run only once if my conditions are met.
As it is now, it will run again, and again, upon each click of the save button, and creates erroneous information.
How can I get my macro to either run once, or what change can I do to get an add-on to be added only once.
Thank You
'Adds 1 point to rate for No Cost loans
dim strNCost as string
dim strProg as string
dim strfix as string
dim strArm as string
dim strNewRate as single
strNcost = GetLoanData(10155)
strfix=GetLoanData(402)
strArm=GetLoanData(292)
strProg=GetLoanData(7074)
If strProg = "CFIX" and strNCost = "Yes" then
strNewRate=(Val(strFix) + 1)
SetLoanData 402, CStr(strNewRate)
end if
If strProg = "CARM" and strNCost = "Yes" then
strNewRate = (Val(strARM) + 1)
SetLoanData 292, CStr(strNewRate)
end if