Results 1 to 2 of 2

Thread: running macros based on meeting cell conditions

  1. #1

    running macros based on meeting cell conditions

    Register for a FREE account, and/
    or Log in to avoid these ads!

    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!

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Excel Version
    Impossible to tell, that code does not look that it would deliver that error. Post your workbook and details on how we can replicate.

Posting Permissions

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