Running code from another workbook

  • Thread starter Thread starter rjtaylor
  • Start date Start date
R

rjtaylor

I save my workbooks on close and this resaves all of the code again and
again which slowes down the process.

So I wanted to run the code from another workbook or ADDIN
I dont understand ADDIN's
I have tried opening the other workbook then call the code normally or
with Workbookname!module2.procedure
this did not work

However if you record a macro with the macro recorder and save it to
another workbook you can run it on the first workbook.

I then recorded that to see how it was being done and I got
Application.Run "Book2!Macro1"
this did not work for me with my code though.
What am I doing wrong.
Thanks for any help
Rod Taylor
 
now that I have the ADDIN and it is working. Is there a way t
referance a sheet on the ADDIN file. No problems referancing the code
 
I'm not sure what you're doing, but do you mean:

=[myAddin.xla]sheet1!A1

in a cell in a worksheet?
 
I am not sure if your sujestion would have worked I found the answe
before I saw that but if the code is running from the addin o
refrenced book then you can type thisworkbook to make referance to th
sheet you wnt on that book even though you can not see the sheet if i
is also an addin.
just incase anyone was also watching this thread
 
Back
Top