View Single Post
  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

June,

That is probably because your add-in name conatains embeedded spaces, so you
need to enclose in single quotes, like so

Application.Run "'Allomax Test 1.xla'!checklegalcopy", myWB

--

HTH

RP
(remove nothere from the email address if mailing direct)


"June Macleod" wrote in message
...
Thanks for answering my query.

I am afraid I had no success with the application run method. It returned

a
message
"the macro 'Allomax Test 1.xla!checklegalcopy' cannot be found.

Any thoughts? The sub procedure checklegalcopy is set to Public.

The vbe method however worked a treat. Thank you very much for your help.

Regards


June


"Bob Phillips" wrote in message
...
Hi June,

You can either run it qualified with the addin name

Application.Run "myAddin.xla!myMacro", myWB

or you can set a reference in the vBE (ToolsReferences) and call it

like
any other procedure.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"June Macleod" wrote in message
...
I have an addin with the Title "Test" saved as "Test 1.xla"

In the addin I have a sub procedure named "checklegal" which takes the
argument "workbookname"

From another workbook which has the "Test" Add In loaded how can I

call
the
"checklegal" procedure?

Many thanks

June