• Run macro from a different workbook (XL)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Run macro from a different workbook (XL)

    Author
    Topic
    #410634

    Hi,

    it is possible to run a macro in a different workbook, which is behind a Command Button on a worksheet?

    Something like
    Application.Run (“‘[Myfile.xls]Sheet1’!CommandButton2_Click”)
    does not work for me.

    Thanks in advance

    Wolf

    Viewing 3 reply threads
    Author
    Replies
    • #884006

      The correct syntax is

      Application.Run "'Myfile.xls'!Sheet1.CommandButton2_Click"

    • #884007

      The correct syntax is

      Application.Run "'Myfile.xls'!Sheet1.CommandButton2_Click"

    • #884008

      Try something like

      Application.Run “‘Yourworkbookname.xls’!Sheet1.CommandButton1_Click”

    • #884009

      Try something like

      Application.Run “‘Yourworkbookname.xls’!Sheet1.CommandButton1_Click”

    Viewing 3 reply threads
    Reply To: Run macro from a different workbook (XL)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: