+ Reply to Thread
Results 1 to 4 of 4

HELP! Calling subroutine in different workbook

  1. #1
    Registered User
    Join Date
    03-01-2006
    Posts
    2

    HELP! Calling subroutine in different workbook

    Hi
    I am trying to call a subroutine test() which resides in Module1 of a loaded add-in 'test.xla'.

    I am calling it from a module in my current workbook, but I cannot get it to run - instead I keep getting

    Run time error 424 Object Required

    I would be enormously grateful for any help!!

    Chris

    The code is:

    In my current workbook:

    Sub testnow()
    [test.xls].[Module1].test
    End Sub


    In Module1 of test.xla:

    Sub test()
    MsgBox "test successful"
    End Sub

  2. #2
    Norman Jones
    Guest

    Re: HELP! Calling subroutine in different workbook

    Hi Chris,

    Try:

    Application.Run "'Test.xla'!Test"


    ---
    Regards,
    Norman



    "ChrisWalker" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi
    > I am trying to call a subroutine test() which resides in Module1 of a
    > loaded add-in 'test.xla'.
    >
    > I am calling it from a module in my current workbook, but I cannot get
    > it to run - instead I keep getting
    >
    > Run time error 424 Object Required
    >
    > I would be enormously grateful for any help!!
    >
    > Chris
    >
    > The code is:
    >
    > IN MY CURRENT WORKBOOK:
    >
    > -Sub testnow()
    > [test.xls].[Module1].test
    > End Sub-
    >
    > IN MODULE1 OF TEST.XLA:
    >
    > -Sub test()
    > MsgBox "test successful"
    > End Sub-
    >
    >
    > --
    > ChrisWalker
    > ------------------------------------------------------------------------
    > ChrisWalker's Profile:
    > http://www.excelforum.com/member.php...o&userid=32022
    > View this thread: http://www.excelforum.com/showthread...hreadid=517739
    >




  3. #3
    Bob Phillips
    Guest

    Re: HELP! Calling subroutine in different workbook

    Application.Run "'test.xla'!test"

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "ChrisWalker" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi
    > I am trying to call a subroutine test() which resides in Module1 of a
    > loaded add-in 'test.xla'.
    >
    > I am calling it from a module in my current workbook, but I cannot get
    > it to run - instead I keep getting
    >
    > Run time error 424 Object Required
    >
    > I would be enormously grateful for any help!!
    >
    > Chris
    >
    > The code is:
    >
    > IN MY CURRENT WORKBOOK:
    >
    > -Sub testnow()
    > [test.xls].[Module1].test
    > End Sub-
    >
    > IN MODULE1 OF TEST.XLA:
    >
    > -Sub test()
    > MsgBox "test successful"
    > End Sub-
    >
    >
    > --
    > ChrisWalker
    > ------------------------------------------------------------------------
    > ChrisWalker's Profile:

    http://www.excelforum.com/member.php...o&userid=32022
    > View this thread: http://www.excelforum.com/showthread...hreadid=517739
    >




  4. #4
    Registered User
    Join Date
    03-01-2006
    Posts
    2

    Thanks

    Thanks guys, works a treat.

+ 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