ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HELP! Calling subroutine in different workbook (https://www.excelbanter.com/excel-programming/354703-help-calling-subroutine-different-workbook.html)

ChrisWalker

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-


--
ChrisWalker
------------------------------------------------------------------------
ChrisWalker's Profile: http://www.excelforum.com/member.php...o&userid=32022
View this thread: http://www.excelforum.com/showthread...hreadid=517739


Norman Jones

HELP! Calling subroutine in different workbook
 
Hi Chris,

Try:

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


---
Regards,
Norman



"ChrisWalker"
wrote in message
...

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




Bob Phillips[_6_]

HELP! Calling subroutine in different workbook
 
Application.Run "'test.xla'!test"

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ChrisWalker"
wrote in message
...

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




ChrisWalker[_2_]

HELP! Calling subroutine in different workbook
 

Thanks guys, works a treat.


--
ChrisWalker
------------------------------------------------------------------------
ChrisWalker's Profile: http://www.excelforum.com/member.php...o&userid=32022
View this thread: http://www.excelforum.com/showthread...hreadid=517739



All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com