Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Nov 2003
    Location
    Germany
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run macro from a different workbook (XL)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Run macro from a different workbook (XL)

    The correct syntax is

    Application.Run <code>"'Myfile.xls'!Sheet1.CommandButton2_Click" </code>

  3. #3
    New Lounger
    Join Date
    Jul 2002
    Location
    Auckland, New Zealand
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run macro from a different workbook (XL)

    Try something like

    Application.Run "'Yourworkbookname.xls'!Sheet1.CommandButton1_Clic k"

Posting Permissions

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