Results 1 to 15 of 15

Compile Error: Sub or Function not defined

Threaded View

salsabreath Compile Error: Sub or... 05-28-2014, 12:47 PM
TMS Re: Compile Error: Sub or... 05-28-2014, 12:54 PM
salsabreath Re: Compile Error: Sub or... 05-28-2014, 01:21 PM
TMS Re: Compile Error: Sub or... 05-28-2014, 03:22 PM
salsabreath Re: Compile Error: Sub or... 05-28-2014, 04:51 PM
TMS Re: Compile Error: Sub or... 05-28-2014, 05:04 PM
salsabreath Re: Compile Error: Sub or... 05-29-2014, 10:45 AM
Alf Re: Compile Error: Sub or... 05-29-2014, 12:51 PM
salsabreath Re: Compile Error: Sub or... 05-29-2014, 06:18 PM
Alf Re: Compile Error: Sub or... 05-30-2014, 06:53 AM
Alf Re: Compile Error: Sub or... 05-31-2014, 03:04 PM
salsabreath Re: Compile Error: Sub or... 06-02-2014, 04:34 PM
salsabreath Re: Compile Error: Sub or... 06-02-2014, 04:40 PM
shg Re: Compile Error: Sub or... 05-31-2014, 03:35 PM
Alf Re: Compile Error: Sub or... 06-02-2014, 05:03 PM
  1. #1
    Registered User
    Join Date
    05-28-2014
    MS-Off Ver
    Office 365; 2013
    Posts
    10

    Compile Error: Sub or Function not defined

    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
    Last edited by salsabreath; 06-02-2014 at 04:43 PM. Reason: Solved! Thanks for the quick help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Compile error: Sub or Function not defined.
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-17-2013, 09:19 AM
  2. compile error: sub or function not defined
    By eaglefana101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2012, 01:18 AM
  3. Compile error: Sub or Function not defined
    By Nanga in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-23-2011, 11:05 AM
  4. Compile Error. Sub of Function not Defined.
    By momo123 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-16-2009, 05:50 AM
  5. Compile Error: Sub or Function Not Defined
    By janderson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2006, 09:15 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1