Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Option Private Module not preventing cross project referencing
I have a procedure in a project module declared as a "Sub
ToggleGridlines()" that is being called by someone elses Add-in. I have placed "Option Private Module" at the top of the module but the Add-in is still calling it. Am I missing someting here. This has always prevented this happening in the past! Seisman |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Option Private Module not preventing cross project referencing
I thought it worked that way, too.
But some minor testing in xl2003 showed that "application.run" didn't care about public or private subs. (Referencing projects and using Call did have trouble.) I'm not sure if this is a change in the way xl2003 works or if it's my (and yours!) bad memory. Are you using xl2003? If no, then it must be a memory failure <bg. seisman wrote: I have a procedure in a project module declared as a "Sub ToggleGridlines()" that is being called by someone elses Add-in. I have placed "Option Private Module" at the top of the module but the Add-in is still calling it. Am I missing someting here. This has always prevented this happening in the past! Seisman -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Option Private Module not preventing cross project referencing
I'm using Excel XP. I think that the offending addin is calling the
routine directly from a menu item and an associated icon bar icon so perhaps the OnAction property works the same as Application.run; I haven't tested it though. Anyway it's taught me a lesson and from now on I'll be adding a few obscure characters to a lot of my proceedures before I publish anything. Most of my proceedure names are long and quite specific but things like ToggleGridlines could be used by anyone. I first noticed this effect between two well known Add-ins, JWalk's "Power Utility Pak" and AppsPro's "ExcelUtilities". If both were loaded at the same time and you click Help in PUP the ExcelUtilities help form appeared. Fortunately ExcelUtilitis is not protected so I just stuck an Option Private Module at the start of the approprate module and it stopped doing it. No such luck this time though. Anyway thanks for the help. Seisman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cross Referencing | Excel Worksheet Functions | |||
Private Sub - Only Accessible from same Module? | Excel Discussion (Misc queries) | |||
Cross Referencing | Excel Discussion (Misc queries) | |||
private variable: same module, other Sub/Function | Excel Programming | |||
Call Private Function from ThisWorkbook module | Excel Programming |