Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Hiding AddIn Methods from Worksheet Functions But Exposing to VBA

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   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Hiding AddIn Methods from Worksheet Functions But Exposing to VBA

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   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Hiding AddIn Methods from Worksheet Functions But Exposing toVBA

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   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Hiding AddIn Methods from Worksheet Functions But Exposing to VBA

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   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Hiding AddIn Methods from Worksheet Functions But Exposing toVBA

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   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Hiding AddIn Methods from Worksheet Functions But Exposing to VBA

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   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Hiding AddIn Methods from Worksheet Functions But Exposing toVBA

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
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
Hiding/Exposing Rows based on a cell value Tami Excel Worksheet Functions 10 July 11th 09 02:03 PM
Using IF functions to calculate shipping cost and methods jjlandrum Excel Worksheet Functions 1 March 12th 08 04:48 PM
Hiding Methods in Automation Add-In Matthew Wieder[_3_] Excel Programming 3 June 23rd 06 02:53 PM
Hiding/Exposing Worksheets based on a Number Entry David Excel Discussion (Misc queries) 6 December 11th 05 02:40 AM
raw speed for excel worksheet functions? - xll -or com addin? John Doe[_3_] Excel Programming 1 August 18th 03 11:26 PM


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