Howdy folks - I'd appreciate your help. I'm a rookie, and am receiving the "Compile Error: Sub or Function not defined" when executing my macro. I'm not clear on how VBA projects, modules, subs, macros, and functions....public and private....all relate - even after spending some time online reading definitions - but certain parts work, this part doesn't. Seems inconsistent. "Execute_Scenario" works, but "Sale_Scenarios" doesn't. I'm passing arguments into both. I've attached my code and screen shots of errors and compile message, but on a high level my flow is the following...
MODULE4
Sub Execute_ScenarioResults()Call Execute_Scenario(column)Call Sale_Scenarios(column, row, SaleMonths)
End Sub
Sub Execute_Scenario(ByVal column As Integer)Call IRR_Solver("Assumptions", "Model_IRR", "NPV_for_IRR_Solver")
End Sub
Sub Sale_Scenarios(ByVal column As Integer, ByVal row As Integer, ByVal SaleMonths As Long)Call IRR_Sale_Scenarios
End Sub
MODULE1
Sub IRR_Solver(ByVal Sheet As String, ByVal IRR As String, ByVal NPV As String)
End Sub
MODULE3
Sub IRR_Sale_Scenarios()Call IRR_Solver(Sheet, IRR, NPV)
End Sub
Sub or Function Not Defined Issue_2014-05-28.docx
Bookmarks