LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Option Private Module

I'm a bit confused: I want to put Option Private Module at the top of all
modules in my addin that contain UDFs because I don't want them appearing in
the function wizard. However, is this going to affect my being able to
access routines in my addin from elsewhere?

VBA help says "When a module contains Option Private Module, the public
parts, for example, variables, objects, and user-defined types declared at
module level, are still available within the project containing the module,
but they are not available to other applications or projects." I was worried
this would stop me being able to use code like the following from other
projects:

Application.Run ("myAddin.xla!myMacro", arg1, arg2)

This still appears to run fine, despite having Option Private Module at the
top of the module containing myMacro.

What then are the ramifications of putting Option Private Module at the top
of every module in my addin? Am I going to have any problems with
pre-existing code in other workbooks that refer to my addin code?
 
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
Private Sub - Only Accessible from same Module? pallaver Excel Discussion (Misc queries) 1 July 8th 08 02:57 PM
Improve method of calling a private function in a private module XP Excel Programming 1 April 30th 08 06:41 PM
How to call a private sub() in another module J@Y Excel Programming 4 July 13th 07 08:08 PM
Option Private Module RB Smissaert Excel Programming 5 April 4th 06 04:53 PM
Option Private Module not preventing cross project referencing seisman Excel Programming 2 July 29th 05 03:24 PM


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