I am running EXCEL 2010 and am trying to run an else_if macro that will run one of two different macros based on the condition (value) of another cell, M6
I am trying to run 2 different reports, and need a different macro to run each report, depending on the user's selection of which report he wants (in cell M6).
Currently my VB macro looks like this:
Sub else_if()
If Range("M6") = "Display_Variance_Report" Then
Call testloop 'macro3
ElseIf Range("M6") = "Display_Monthly_Report" Then
Call testloop 'macro2
End If
End Sub
When I try to run this macro is says that it "Can't execute code in break mode". What have I done wrong, and how can I easily fix this up?
I am quite new to macros and VB programming so please don't get too technical, I can follow basic instructions pretty well though.
I am designing a work project at the moment and am in need of immediate help, thank you anybody for your assistance, much appreciated!
I am trying to run 2 different reports, and need a different macro to run each report, depending on the user's selection of which report he wants (in cell M6).
Currently my VB macro looks like this:
Sub else_if()
If Range("M6") = "Display_Variance_Report" Then
Call testloop 'macro3
ElseIf Range("M6") = "Display_Monthly_Report" Then
Call testloop 'macro2
End If
End Sub
When I try to run this macro is says that it "Can't execute code in break mode". What have I done wrong, and how can I easily fix this up?
I am quite new to macros and VB programming so please don't get too technical, I can follow basic instructions pretty well though.
I am designing a work project at the moment and am in need of immediate help, thank you anybody for your assistance, much appreciated!