Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Ephrata, Washington, USA
    Posts
    683
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro execute from another work book (Excel 2003)

    One of our users sent me a note asking, "How do you get a button to execute a macro that lives in another .xls, to execute and not actually open the .xls in which the macro lives??? We have a macro that reads data from one workbbook and imports it into a different workbook. "

    Someone said this worked fine in Excel 97. We are very new to Excel 2003, so I don't know how to help with this question.

  2. #2
    Star Lounger
    Join Date
    Jan 2004
    Location
    Westervoort, Netherlands
    Posts
    56
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Macro execute from another work book (Excel 2003)

    Hi

    Isn't it possible to use te call command and combine it with the full path and filename. I don't know if this will work but this is what I would try. You should propbaly create a macro for the button in the spreatsheet where the buttin should come.

    I hope this helps.

    GRTZ

    Forbaty

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro execute from another work book (Excel 2003)

    It sounds like the macro should be put into Personal.xls. See if <!post=This Post,118382>This Post<!/post> helps.
    Legare Coleman

  4. #4
    3 Star Lounger
    Join Date
    Feb 2003
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro execute from another work book (Excel 2003)

    Create a macro in Wbk1 that will
    1. Open Wbk2
    2. Use Application.Run (Wbk2 "MacroName")
    3. Close Wbk2

    Or install "MacroName" in Personal.xls, then call it from Wbk1

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Macro execute from another work book (Excel 2003)

    You can read information from a closed workbook via links, but I do not think it is possible to run a macro without the workbook that contains the macro being open.

    You can use the personal.xls as suggested by Legare or you can have the macro open the other workbook and run its code. The other workbook could be hidden so it does not appear to be open.
    Steve

Posting Permissions

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