HFM VBA Rules not executing Subroutine
I am running into an issue with my rules file where the Call to any subroutine will not execute. Any help around this would help.
Troubleshooting steps:
1. Create a WriteToFile Subroutine to create log files
a. Realized that did not work because the rules are not executing any of the subroutines.
2. Pasted the Body of the Subroutine within the Calculate Routine.
a. This resolved the problem, but I essentially have to paste all my code into the Calculate routine. This works, but isn't pretty and if I want to create log files I have to paste a large WriteToFile procedure in the middle of the code.
Example Code:
'***************************************************
Sub Calculate ()
Define Generic Variables (Not going to list them for now)
Call Netting()
Call TaxNetting()
End Sub 'End Calculate
'***************************************************
Sub Netting()
Call WriteToFile("POV Variables")
Beginning of Netting Rules
Call WriteToFile("POV Variables and Results of calculations")
End of Netting Rules
End Sub 'End Netting
'***************************************************
Sub TaxNetting()
Beginning of Tax Netting Rules
Call WriteToFile("POV Variables and Results of calculations")
End of Tax Netting Rules
End Sub 'End TaxNetting
'***************************************************
Sub WriteToFile(txtStringToWrite)
End Sub 'End WriteToFile