Automating Macro Button Push

  • In an Excel purchased program, and to run the program (code hidden), I must push a Macro Button. This program can generate historical data and right now I manually press the Button then transfer the historical data to my own spread sheet with a VBA Sub. Then change the date for his program, push the button and run my Sub again. 'Record Macro' doesn't generate code to push the Button. Is there a way to push the Button via my VBA code, so the computer can do the manual work?

    Thanks,

    Scott

  • Hello,


    In the module ThisWorkbook, you can have

    Code
    Private Sub Workbook_Open()
       Application.Run("yourMacro")
    End Sub

    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • What kind of button are you referring to?

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

  • What options do you get if you right-click it? Anything?

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

  • No options, and his Macros are not visible. I think if I had his Sub name, I could call it. Not sure if I can get that info, thought I'd try this forum first.

    Thanks,

    Scott

  • Based on your comments ...


    The bare minimum would be ... from your "supplier" ... to give you the exact macro name used to launch your program ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Thanks, was just hopeful I could automate it without asking, not sure he'd respond.

    If my understanding is correct ... you (or your company...) have paid for this development ...


    Your supplier might have decided not to give you the password to get into the source code ...

    BUT giving you the complete list of the Macros' Names should not be a problem ;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • That's the unknown, if I can get the Macro name. Maybe, maybe not. Would rather not ask.


    Hopefully, you do not need a Black-Scholes model ... to determine if you should ask or not ... ;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • If you enable the Developer tab and click Design Mode (the blue triangle/set square button), can you then select the button in question?

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

  • Design Mode is disabled.

    Thanks for continuing to work on this. I just sat for 30 minutes pushing his button, then running my VBA sub. I asked him (developer) for historical data or the name of his sub, no luck.

    Scott

  • Is the worksheet protected?

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

  • Hi Scott,


    Do you mean that you actually know the developer ... and he does not want to insert a simple one-line instruction ... !!! :huh:

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!