Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Unable to run Excel addin procedure from Word

Hi!

I'm trying to run an Excel Addin which is password protected and therefore I
cannot have it's code.

I'm able to run the main procedure from Excel, by:
Application.Run "Main_Procedure_Name"
(I know the main procedure name)

The problem is that if I try to run this code from Word, by defining an
Excel object (named XLApp), and running the following command:
XLApp.Run "Main_Procedure_Name", It cannot find the procedure.

It's weird because problem is solved if I move the Addin control to the main
command bar, and runs the following command instead of XLAPP.Run
"Main_Procedure_Name":

XLApp.CommandBars("Worksheet Menu
Bar").Controls("MyAddinControlCaption").Execute.
(Replacing "MyAddinControlCaption" with the real caption of the addin
button.)

Therefore it seems that it's not a problem with my Excel object definition,
or something, but I have no explanation why it can find the procedure when
it's executed when Excel is opened regularely (not by Word macro), but it
can't find it (though able to activate it using a control) when it's
executed by Word Macro.

Macro works fine using the solution of moving the Addin control to the main
control bar and using the XLApp.CommandBars.....Execute command, but I don't
want to move the Addin control to the main command bar in each of the
computers I wish to install the macro on..

Kind Regards,
Amir.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Unable to run Excel addin procedure from Word

Amir,

I believe you need to add the name of the workbook
to the Run method...

XLApp.Run "WorkbookName.xla!Main_Procedure_Name"

Jim Cone
San Francisco, USA


"Amir" wrote in message
...
Hi!
I'm trying to run an Excel Addin which is password protected and therefore I
cannot have it's code.
I'm able to run the main procedure from Excel, by:
Application.Run "Main_Procedure_Name"
(I know the main procedure name)
The problem is that if I try to run this code from Word, by defining an
Excel object (named XLApp), and running the following command:
XLApp.Run "Main_Procedure_Name", It cannot find the procedure.

It's weird because problem is solved if I move the Addin control to the main
command bar, and runs the following command instead of XLAPP.Run
"Main_Procedure_Name":

XLApp.CommandBars("Worksheet Menu
Bar").Controls("MyAddinControlCaption").Execute.
(Replacing "MyAddinControlCaption" with the real caption of the addin
button.)
Therefore it seems that it's not a problem with my Excel object definition,
or something, but I have no explanation why it can find the procedure when
it's executed when Excel is opened regularely (not by Word macro), but it
can't find it (though able to activate it using a control) when it's
executed by Word Macro.
Macro works fine using the solution of moving the Addin control to the main
control bar and using the XLApp.CommandBars.....Execute command, but I don't
want to move the Addin control to the main command bar in each of the
computers I wish to install the macro on..

Kind Regards,
Amir.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Unable to run Excel addin procedure from Word

Hi Amir,

Try searching for "excel password protection" on google. There are lots of
tools that can help you find the password for an excel add-in where the
password is not available, like when a developer has left the company etc.

If you can get into the code then yuo'll be able to do whatever you want.
--
www.alignment-systems.com


"Amir" wrote:

Hi!

I'm trying to run an Excel Addin which is password protected and therefore I
cannot have it's code.

I'm able to run the main procedure from Excel, by:
Application.Run "Main_Procedure_Name"
(I know the main procedure name)

The problem is that if I try to run this code from Word, by defining an
Excel object (named XLApp), and running the following command:
XLApp.Run "Main_Procedure_Name", It cannot find the procedure.

It's weird because problem is solved if I move the Addin control to the main
command bar, and runs the following command instead of XLAPP.Run
"Main_Procedure_Name":

XLApp.CommandBars("Worksheet Menu
Bar").Controls("MyAddinControlCaption").Execute.
(Replacing "MyAddinControlCaption" with the real caption of the addin
button.)

Therefore it seems that it's not a problem with my Excel object definition,
or something, but I have no explanation why it can find the procedure when
it's executed when Excel is opened regularely (not by Word macro), but it
can't find it (though able to activate it using a control) when it's
executed by Word Macro.

Macro works fine using the solution of moving the Addin control to the main
control bar and using the XLApp.CommandBars.....Execute command, but I don't
want to move the Addin control to the main command bar in each of the
computers I wish to install the macro on..

Kind Regards,
Amir.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unable to run Excel addin procedure from Word


You can also write a function or macro with the call to the add in i
it

--
Kaa
-----------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...nfo&userid=751
View this thread: http://www.excelforum.com/showthread.php?threadid=37758

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Unable to run Excel addin procedure from Word

Hi,
I've tried that but it refuses to work unless this function/macro runs from
Excel itself, and not from Word..

"Kaak" wrote in message
...

You can also write a function or macro with the call to the add in in
it.


--
Kaak
------------------------------------------------------------------------
Kaak's Profile:
http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=377589





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unable to run Excel addin procedure from Word


You should write the function with the call to the add in in excel.

and call that function from word.


--
Kaak
------------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=377589

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Unable to run Excel addin procedure from Word

Thanks!
Regards.

"Kaak" wrote in message
...

You should write the function with the call to the add in in excel.

and call that function from word.


--
Kaak
------------------------------------------------------------------------
Kaak's Profile:
http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=377589



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
Unable to open embedded word document from Excel Sylvain Excel Discussion (Misc queries) 0 February 23rd 10 07:44 PM
Word with embedded Excel object which has reference to addin Tom Chau Excel Discussion (Misc queries) 0 September 6th 06 02:25 AM
i am unable to add, delete or modify in excel or word. Vinay Naidu Setting up and Configuration of Excel 1 April 20th 06 05:36 PM
Unable to set the active cell from within a VBA procedure HMS Excel Programming 1 December 7th 04 09:57 PM
Calling a procedure in a protected VBA Addin Project Chip Pearson Excel Programming 1 September 25th 04 03:47 PM


All times are GMT +1. The time now is 09:29 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"