Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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
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
Cross Referencing misstrious Excel Worksheet Functions 1 January 8th 10 07:34 PM
Private Sub - Only Accessible from same Module? pallaver Excel Discussion (Misc queries) 1 July 8th 08 02:57 PM
Cross Referencing Saxman Excel Discussion (Misc queries) 0 October 26th 06 04:58 PM
private variable: same module, other Sub/Function Stefi Excel Programming 4 July 5th 05 09:10 AM
Call Private Function from ThisWorkbook module Beto[_3_] Excel Programming 3 February 25th 04 01:36 PM


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