Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Add-In Functions not listed in Automation

Q from Excel novice

1. I created an Excel Addin (myUDF.xla) that contains my user defined
functions
and saved it in the "...Application Data\Microsoft\Excel\XLSTART"
folder so that it is automatically loaded everytime I launch Excel.

2. I then launched Excel. (it opens Book1.xls)

3. I click the "Paste Function fx" function and browse to see what User
defined functions are available.
The functions the I added in myUDF.xla show up on the list. Great...

However, when I launch Excel through automation, and then open a workbook,
and repeat step 3
my user defined functions are no longer on the list.

Please note: My addin"myUDF" is never listed in the Add-ins available even
in 2 when I launch Excel directly without automation. However, the functions
are made available in this case.

Has anyone encountered this problem when invoking Excel through automation?
How can I resolve this? Your help is greatly appreciated.

Thanks,
Siva

================
Here is a sample VB code that I used to test this:
Public Function DoLaunch(objExcelApplication As Excel.Application) As Boolean
On Local Error GoTo DoLaunchEH
Set objExcelApplication = CreateObject(mcsExcelApplication)
With objExcelApplication
.Visible = True
'.AddIns
End With
DoLaunch = True
DoLaunchEH:
End Function



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Add-In Functions not listed in Automation


"mrvgson" wrote in message
...
Q from Excel novice

1. I created an Excel Addin (myUDF.xla) that contains my user defined
functions
and saved it in the "...Application Data\Microsoft\Excel\XLSTART"
folder so that it is automatically loaded everytime I launch Excel.

2. I then launched Excel. (it opens Book1.xls)

3. I click the "Paste Function fx" function and browse to see what User
defined functions are available.
The functions the I added in myUDF.xla show up on the list. Great...

However, when I launch Excel through automation, and then open a workbook,
and repeat step 3
my user defined functions are no longer on the list.

Please note: My addin"myUDF" is never listed in the Add-ins available even
in 2 when I launch Excel directly without automation. However, the

functions
are made available in this case.

Has anyone encountered this problem when invoking Excel through

automation?
How can I resolve this? Your help is greatly appreciated.

Thanks,
Siva


This is how Excel works. It won't load add-ins when Excel is started as an
automation object. Behavior by design.

/Fredrik


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Add-In Functions not listed in Automation

Thanks.
Are there other ways to work at this? ( I want to have my functions in a
separate place; I then want to use them repeatedly in different worksheets)


"Fredrik Wahlgren" wrote:


"mrvgson" wrote in message
...
Q from Excel novice

1. I created an Excel Addin (myUDF.xla) that contains my user defined
functions
and saved it in the "...Application Data\Microsoft\Excel\XLSTART"
folder so that it is automatically loaded everytime I launch Excel.

2. I then launched Excel. (it opens Book1.xls)

3. I click the "Paste Function fx" function and browse to see what User
defined functions are available.
The functions the I added in myUDF.xla show up on the list. Great...

However, when I launch Excel through automation, and then open a workbook,
and repeat step 3
my user defined functions are no longer on the list.

Please note: My addin"myUDF" is never listed in the Add-ins available even
in 2 when I launch Excel directly without automation. However, the

functions
are made available in this case.

Has anyone encountered this problem when invoking Excel through

automation?
How can I resolve this? Your help is greatly appreciated.

Thanks,
Siva


This is how Excel works. It won't load add-ins when Excel is started as an
automation object. Behavior by design.

/Fredrik



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default Add-In Functions not listed in Automation

First, you haven't installed the add-in as an add-in. Double clicking on an add-in
in Explorer opens the workbook, but not as an add-in, so it won't show up in the list.

Second, as Fredrik points out, opening Excel via Automation avoids opening any of
the installed add-ins. But you can open the add-in file using
xlApp.Workbooks.Open(<add-in full name)

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


mrvgson wrote:

Thanks.
Are there other ways to work at this? ( I want to have my functions in a
separate place; I then want to use them repeatedly in different worksheets)


"Fredrik Wahlgren" wrote:


"mrvgson" wrote in message
...

Q from Excel novice

1. I created an Excel Addin (myUDF.xla) that contains my user defined
functions
and saved it in the "...Application Data\Microsoft\Excel\XLSTART"
folder so that it is automatically loaded everytime I launch Excel.

2. I then launched Excel. (it opens Book1.xls)

3. I click the "Paste Function fx" function and browse to see what User
defined functions are available.
The functions the I added in myUDF.xla show up on the list. Great...

However, when I launch Excel through automation, and then open a workbook,
and repeat step 3
my user defined functions are no longer on the list.

Please note: My addin"myUDF" is never listed in the Add-ins available even
in 2 when I launch Excel directly without automation. However, the


functions

are made available in this case.

Has anyone encountered this problem when invoking Excel through


automation?

How can I resolve this? Your help is greatly appreciated.

Thanks,
Siva


This is how Excel works. It won't load add-ins when Excel is started as an
automation object. Behavior by design.

/Fredrik




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Add-In Functions not listed in Automation

First, you haven't installed the add-in as an add-in. Double clicking on an
add-in
in Explorer opens the workbook, but not as an add-in, so it won't show up in the list.

Thanks Jon. However, I think you misunderstood my question. I did not
double click on an add-in. The fact that I put it in the XLSTART seems to be
sufficient for Excel to realize that this Add-in should be loaded when Excel
is launched.

Second, as Fredrik points out, opening Excel via Automation avoids opening any of the installed add-ins. But you can open the add-in file using

xlApp.Workbooks.Open(<add-in full name)
Again, I am not trying to open the Add-in in Excel. Rather I am trying to
open a different workbook and in that workbook I want to use the functions
defined in my add-in.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Add-In Functions not listed in Automation

Opening an addin is equivalent to loading it in Tools=Addins.

So, As Jon suggested, after starting excel with automation, open your addin
(it won't be visible), then open your workbook and your functions should be
available.

--
Regards,
Tom Ogilvy

"mrvgson" wrote in message
...
First, you haven't installed the add-in as an add-in. Double clicking on

an
add-in
in Explorer opens the workbook, but not as an add-in, so it won't show

up in the list.
Thanks Jon. However, I think you misunderstood my question. I did not
double click on an add-in. The fact that I put it in the XLSTART seems to

be
sufficient for Excel to realize that this Add-in should be loaded when

Excel
is launched.

Second, as Fredrik points out, opening Excel via Automation avoids

opening any of the installed add-ins. But you can open the add-in file
using
xlApp.Workbooks.Open(<add-in full name)
Again, I am not trying to open the Add-in in Excel. Rather I am trying to
open a different workbook and in that workbook I want to use the functions
defined in my add-in.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Add-In Functions not listed in Automation

Try something like Application.AddIns("MyUDF").Installed = true
--
http://ManagedXLL.net/
Replace MSDN with my first name when replying to my email address!



"mrvgson" wrote in message
...
Q from Excel novice

1. I created an Excel Addin (myUDF.xla) that contains my user defined
functions
and saved it in the "...Application Data\Microsoft\Excel\XLSTART"
folder so that it is automatically loaded everytime I launch Excel.

2. I then launched Excel. (it opens Book1.xls)

3. I click the "Paste Function fx" function and browse to see what User
defined functions are available.
The functions the I added in myUDF.xla show up on the list. Great...

However, when I launch Excel through automation, and then open a workbook,
and repeat step 3
my user defined functions are no longer on the list.

Please note: My addin"myUDF" is never listed in the Add-ins available even
in 2 when I launch Excel directly without automation. However, the

functions
are made available in this case.

Has anyone encountered this problem when invoking Excel through

automation?
How can I resolve this? Your help is greatly appreciated.

Thanks,
Siva

================
Here is a sample VB code that I used to test this:
Public Function DoLaunch(objExcelApplication As Excel.Application) As

Boolean
On Local Error GoTo DoLaunchEH
Set objExcelApplication = CreateObject(mcsExcelApplication)
With objExcelApplication
.Visible = True
'.AddIns
End With
DoLaunch = True
DoLaunchEH:
End Function





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Add-In Functions not listed in Automation

Jens, I did try your suggestion. However it did not work.
I even tried using the full path of the add-in file.
I also tried adding it first, but then it quits at that line (see code below)

Thanks.

==========================
Public Function DoLaunch(objExcelApplication As Excel.Application) As Boolean
On Local Error GoTo DoLaunchEH
Set objExcelApplication = CreateObject(mcsExcelApplication)
With objExcelApplication
.Visible = True
.AddIns.Add FileName:="C:\Documents and
Settings\natarajs\Application Data\Microsoft\Excel\XLSTART\IPEWB_UDF1.xla" '
Path + "myUDF.xla" ---IT JUMPS THE END FUNCTION AFTER THIS LINE
.AddIns("IPEWB_UDF1").Installed = True 'AddIns("myUDF").Installed =
True
End With

End Function


"Jens Thiel" wrote:

Try something like Application.AddIns("MyUDF").Installed = true
--
http://ManagedXLL.net/
Replace MSDN with my first name when replying to my email address!



"mrvgson" wrote in message
...
Q from Excel novice

1. I created an Excel Addin (myUDF.xla) that contains my user defined
functions
and saved it in the "...Application Data\Microsoft\Excel\XLSTART"
folder so that it is automatically loaded everytime I launch Excel.

2. I then launched Excel. (it opens Book1.xls)

3. I click the "Paste Function fx" function and browse to see what User
defined functions are available.
The functions the I added in myUDF.xla show up on the list. Great...

However, when I launch Excel through automation, and then open a workbook,
and repeat step 3
my user defined functions are no longer on the list.

Please note: My addin"myUDF" is never listed in the Add-ins available even
in 2 when I launch Excel directly without automation. However, the

functions
are made available in this case.

Has anyone encountered this problem when invoking Excel through

automation?
How can I resolve this? Your help is greatly appreciated.

Thanks,
Siva

================
Here is a sample VB code that I used to test this:
Public Function DoLaunch(objExcelApplication As Excel.Application) As

Boolean
On Local Error GoTo DoLaunchEH
Set objExcelApplication = CreateObject(mcsExcelApplication)
With objExcelApplication
.Visible = True
'.AddIns
End With
DoLaunch = True
DoLaunchEH:
End Function






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Add-In Functions not listed in Automation


"mrvgson" wrote in message
...
Jens, I did try your suggestion. However it did not work.
I even tried using the full path of the add-in file.
I also tried adding it first, but then it quits at that line (see code

below)

Thanks.


I don't think you have installed your add-in properly. Follow these steps
carefully

1) Remove the add-in from the xkstart directory. Put it where you think it
should be.
2) Start Excel and open Tools|Add-ins.
3) If Excel complains that it can't find your add-in and asks whether it
should be removed, click yes.
4) Exit Excel. This will Save the registry settings.
5) Start Excel. Open Tools|add-ins and install your add-in.
6) Exit Excel. Again, this will save the settings.
7) Start Excel and verify that your add-in has been loaded.

Now you can do what Jens suggested.

/ Fredrik


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Add-In Functions not listed in Automation

Fredrik: What you suggested would work fine. However, this is not the
solution I am looking for.
My question was how to do all of this when Excel is invoked programatically.
In my case, I do not want to go through the steps you suggested manually.
From the earlier reply from Jon , Excel does not allow this in Automation.

Thanks for your suggestons.


"Fredrik Wahlgren" wrote:


"mrvgson" wrote in message
...
Jens, I did try your suggestion. However it did not work.
I even tried using the full path of the add-in file.
I also tried adding it first, but then it quits at that line (see code

below)

Thanks.


I don't think you have installed your add-in properly. Follow these steps
carefully

1) Remove the add-in from the xkstart directory. Put it where you think it
should be.
2) Start Excel and open Tools|Add-ins.
3) If Excel complains that it can't find your add-in and asks whether it
should be removed, click yes.
4) Exit Excel. This will Save the registry settings.
5) Start Excel. Open Tools|add-ins and install your add-in.
6) Exit Excel. Again, this will save the settings.
7) Start Excel and verify that your add-in has been loaded.

Now you can do what Jens suggested.

/ Fredrik





  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Add-In Functions not listed in Automation


"mrvgson" wrote in message
...
Fredrik: What you suggested would work fine. However, this is not the
solution I am looking for.
My question was how to do all of this when Excel is invoked

programatically.
In my case, I do not want to go through the steps you suggested manually.
From the earlier reply from Jon , Excel does not allow this in Automation.

Thanks for your suggestons.


"Fredrik Wahlgren" wrote:


I did have exactly the same problem and the solution we came up with was, as
far as I can remember, identical to what Jens suggested. I think you have to
do these steps manually in order for Jens' solution to work.

/ Fredrik


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
DATEDIF FUNCTION NOT LISTED IN HELP Asoka Walpitagama - Brandix College IT Excel Worksheet Functions 2 March 23rd 10 01:23 PM
Sum with #N/A listed Pran Excel Worksheet Functions 6 August 3rd 09 07:53 AM
sum values from the listed sheets [email protected] Excel Worksheet Functions 9 October 15th 07 03:02 PM
How to select a listed item? Eric Excel Discussion (Misc queries) 1 August 10th 07 05:26 PM
How many times is a name listed sabegirl Excel Discussion (Misc queries) 4 June 18th 06 08:42 AM


All times are GMT +1. The time now is 10:18 AM.

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

About Us

"It's about Microsoft Excel"