Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Make Function Accessible only from VBA

Hi,
I have a few UDFs that should only be callable from VBA
(they are meaningless as spreadsheet functions). Does
anybody know how to make a UDF invisible to the
spreadsheet, but visible to any/all VBA modules? I don't
think the "Private" designation is appropriate because it
makes the UDF invisible to all other VBA modules.

An example of this would be the MsgBox function, which is
callable from any VBA module, but not callable directly
from a spreadsheet.

Thanks in advance for any help.
Ryan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Make Function Accessible only from VBA

Hi Ryan,

Using the Option Private Module directive will prevent public functions
from being displayed in the function wizard. If the user knows the exact
name and argument list they can still enter the function in a cell and it
will get called, but this isn't normally a problem. I'm pretty sure the only
way to prevent any use in a worksheet function is to either make your
functions private or wrap them in a class module and use them in your VBA
project through an instance of the class.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Ryan Poth" wrote in message
...
Hi,
I have a few UDFs that should only be callable from VBA
(they are meaningless as spreadsheet functions). Does
anybody know how to make a UDF invisible to the
spreadsheet, but visible to any/all VBA modules? I don't
think the "Private" designation is appropriate because it
makes the UDF invisible to all other VBA modules.

An example of this would be the MsgBox function, which is
callable from any VBA module, but not callable directly
from a spreadsheet.

Thanks in advance for any help.
Ryan



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
form option buttons - how can I make them accessible? lynn Excel Discussion (Misc queries) 1 February 10th 10 02:59 PM
how do I make a template accessible RockStar Excel Discussion (Misc queries) 1 September 21st 09 01:06 PM
Why Would Add-In Modules Not Be Accessible? Edwin Kelly Excel Discussion (Misc queries) 2 June 23rd 09 06:11 PM
How do I make sure my Wkbook is accessible to users using earlier Mifty Excel Discussion (Misc queries) 1 May 12th 08 01:30 PM
How do I make a text box accessible in a protected Excel sheet? JWarnick-SHH Excel Worksheet Functions 5 March 16th 06 01:53 PM


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