Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
June Macleod
 
Posts: n/a
Default How can I reference a procedure in an Add In?

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


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

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




  #3   Report Post  
June Macleod
 
Posts: n/a
Default

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






  #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








  #5   Report Post  
June Macleod
 
Posts: n/a
Default

Thank you. That solved it.

June


"Bob Phillips" wrote in message
...
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










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell reference in a formula is called ??????????? Excel Discussion (Misc queries) 2 April 22nd 23 09:02 AM
how to cell reference a Chart title Rasoul Khoshravan Azar Charts and Charting in Excel 2 January 1st 05 05:00 PM
how do i reference cells to create a chart? Nick M Charts and Charting in Excel 1 December 15th 04 03:50 AM
Fonts get size 1 and can't be changed after a procedure - even by excel GUI!! Marie J-son Charts and Charting in Excel 2 December 6th 04 04:11 AM
3 cells are named - how to refere to them in one reference field in a chart Marie J-son Charts and Charting in Excel 2 December 2nd 04 04:52 PM


All times are GMT +1. The time now is 06:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"