Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
Our Automation Add-In has some methods that return object types Excel not fit
for Excel (one of the methods retunrs a custom collection for example). Is there some way to hide this method so the end user won't try and use it as a worksheet function, yet have it visible so that it can be used in VBA where such objects can be correctly used? As it is, it appears all public methods are visible in both VBA and Excel Sheet Functions. |
#2
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
Either turn the Sub to Private,
or create a dummy argument that will keep it from being shown as executable. HTH -- AP "Matthew Wieder" a écrit dans le message de news: ... Our Automation Add-In has some methods that return object types Excel not fit for Excel (one of the methods retunrs a custom collection for example). Is there some way to hide this method so the end user won't try and use it as a worksheet function, yet have it visible so that it can be used in VBA where such objects can be correctly used? As it is, it appears all public methods are visible in both VBA and Excel Sheet Functions. |
#3
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
Making the method private hides it from VBA as well since it doesn't get
registed by COM so that won't work. What type of 'dummy argument' would stop a method in an Automation Add-In from being shown as executable? Ardus Petus wrote: Either turn the Sub to Private, or create a dummy argument that will keep it from being shown as executable. HTH -- AP "Matthew Wieder" a écrit dans le message de news: ... Our Automation Add-In has some methods that return object types Excel not fit for Excel (one of the methods retunrs a custom collection for example). Is there some way to hide this method so the end user won't try and use it as a worksheet function, yet have it visible so that it can be used in VBA where such objects can be correctly used? As it is, it appears all public methods are visible in both VBA and Excel Sheet Functions. |
#5
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
At the top of a module you can add
Option Private Module which will keep everything in that module private from the end user. If you are in a class check out the bottom of Chip's site here... http://www.cpearson.com/excel/ClassModules.htm -- HTH... Jim Thomlinson "Matthew Wieder" wrote: Our Automation Add-In has some methods that return object types Excel not fit for Excel (one of the methods retunrs a custom collection for example). Is there some way to hide this method so the end user won't try and use it as a worksheet function, yet have it visible so that it can be used in VBA where such objects can be correctly used? As it is, it appears all public methods are visible in both VBA and Excel Sheet Functions. |
#6
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm am in an "Automation Add-In" not an Excel VBA Add-In. Managed C#
code available in Excel XP and 2003. Jim Thomlinson wrote: At the top of a module you can add Option Private Module which will keep everything in that module private from the end user. If you are in a class check out the bottom of Chip's site here... http://www.cpearson.com/excel/ClassModules.htm |
#7
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
Add
Option Private Module to the head of the module. This will make all procedures private to the project, i.e. any module in the project can use them, other projects (and Excel) will not see them. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Matthew Wieder" wrote in message ... Our Automation Add-In has some methods that return object types Excel not fit for Excel (one of the methods retunrs a custom collection for example). Is there some way to hide this method so the end user won't try and use it as a worksheet function, yet have it visible so that it can be used in VBA where such objects can be correctly used? As it is, it appears all public methods are visible in both VBA and Excel Sheet Functions. |
#8
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
As I stated in my first post this is an Automation Add-In - managed C#
code; there is no module. Bob Phillips wrote: Add Option Private Module to the head of the module. This will make all procedures private to the project, i.e. any module in the project can use them, other projects (and Excel) will not see them. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hiding/Exposing Rows based on a cell value | Excel Worksheet Functions | |||
Using IF functions to calculate shipping cost and methods | Excel Worksheet Functions | |||
Hiding Methods in Automation Add-In | Excel Programming | |||
Hiding/Exposing Worksheets based on a Number Entry | Excel Discussion (Misc queries) | |||
raw speed for excel worksheet functions? - xll -or com addin? | Excel Programming |