+ Reply to Thread
Results 1 to 6 of 6

call external macro

Hybrid View

  1. #1
    Registered User
    Join Date
    09-03-2005
    Posts
    5
    I have tried your second suggestion, that is exactly what I would like
    to do.

    In my .xla add-in I have a subroutine called "Import".

    When I try to run it from my workbook I get an error.

    What is the syntax to be used to call a sub or function in an xla file?

    I have tried several different syntax but no one works.

  2. #2
    Dave Peterson
    Guest

    Re: call external macro

    What did you try?

    I would have guessed that:
    x = Application.Run("'YourAdd-in.xla'!YourSubName", Arg1, Arg2)

    would have worked fine.

    gm139 wrote:
    >
    > I have tried your second suggestion, that is exactly what I would like
    > to do.
    >
    > In my .xla add-in I have a subroutine called "Import".
    >
    > When I try to run it from my workbook I get an error.
    >
    > What is the syntax to be used to call a sub or function in an xla
    > file?
    >
    > I have tried several different syntax but no one works.
    >
    > --
    > gm139
    > ------------------------------------------------------------------------
    > gm139's Profile: http://www.excelforum.com/member.php...o&userid=26951
    > View this thread: http://www.excelforum.com/showthread...hreadid=510211


    --

    Dave Peterson

  3. #3
    sylvain
    Guest

    Re: call external macro

    Hello Dave,

    Thanks a lot because I was looking for a similar problem,
    something like :
    x = Application.Run("'D:\...\YourAdd-in.xla'!YourSubName", Arg1, Arg2)

    and it wasn't working while I didn't use the "'" character...

    Best regards, Sylvain


    Dave Peterson a écrit :
    > What did you try?
    >
    > I would have guessed that:
    > x = Application.Run("'YourAdd-in.xla'!YourSubName", Arg1, Arg2)
    >
    > would have worked fine.
    >
    > gm139 wrote:
    >
    >>I have tried your second suggestion, that is exactly what I would like
    >>to do.
    >>
    >>In my .xla add-in I have a subroutine called "Import".
    >>
    >>When I try to run it from my workbook I get an error.
    >>
    >>What is the syntax to be used to call a sub or function in an xla
    >>file?
    >>
    >>I have tried several different syntax but no one works.
    >>
    >>--
    >>gm139
    >>------------------------------------------------------------------------
    >>gm139's Profile: http://www.excelforum.com/member.php...o&userid=26951
    >>View this thread: http://www.excelforum.com/showthread...hreadid=510211

    >
    >


  4. #4
    Dave Peterson
    Guest

    Re: call external macro

    Remember that the other workbook has to be open--so drop the drive/path stuff.

    sylvain wrote:
    >
    > Hello Dave,
    >
    > Thanks a lot because I was looking for a similar problem,
    > something like :
    > x = Application.Run("'D:\...\YourAdd-in.xla'!YourSubName", Arg1, Arg2)
    >
    > and it wasn't working while I didn't use the "'" character...
    >
    > Best regards, Sylvain
    >
    > Dave Peterson a écrit :
    > > What did you try?
    > >
    > > I would have guessed that:
    > > x = Application.Run("'YourAdd-in.xla'!YourSubName", Arg1, Arg2)
    > >
    > > would have worked fine.
    > >
    > > gm139 wrote:
    > >
    > >>I have tried your second suggestion, that is exactly what I would like
    > >>to do.
    > >>
    > >>In my .xla add-in I have a subroutine called "Import".
    > >>
    > >>When I try to run it from my workbook I get an error.
    > >>
    > >>What is the syntax to be used to call a sub or function in an xla
    > >>file?
    > >>
    > >>I have tried several different syntax but no one works.
    > >>
    > >>--
    > >>gm139
    > >>------------------------------------------------------------------------
    > >>gm139's Profile: http://www.excelforum.com/member.php...o&userid=26951
    > >>View this thread: http://www.excelforum.com/showthread...hreadid=510211

    > >
    > >


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1