PC Review


Reply
Thread Tools Rate Thread

How to call a private sub() in another module

 
 
=?Utf-8?B?SkBZ?=
Guest
Posts: n/a
 
      13th Jul 2007
Is there a way to call a private sub from another module? I am trying to have
the private sub not visible in the Macro selection, but I can't call it from
another module by having it private.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?WFA=?=
Guest
Posts: n/a
 
      13th Jul 2007
Hi,

I would put: Option Private Module
at the very top of your module, thus cloaking it from the macros menu;

Then make your sub public as in: Public Sub MySub()

HTH

"J@Y" wrote:

> Is there a way to call a private sub from another module? I am trying to have
> the private sub not visible in the Macro selection, but I can't call it from
> another module by having it private.

 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      13th Jul 2007
Run "myMacroName"

"J@Y" wrote:

> Is there a way to call a private sub from another module? I am trying to have
> the private sub not visible in the Macro selection, but I can't call it from
> another module by having it private.

 
Reply With Quote
 
=?Utf-8?B?SkBZ?=
Guest
Posts: n/a
 
      13th Jul 2007
Thanks, thats something useful to know.

"XP" wrote:

> Hi,
>
> I would put: Option Private Module
> at the very top of your module, thus cloaking it from the macros menu;
>
> Then make your sub public as in: Public Sub MySub()
>
> HTH
>
> "J@Y" wrote:
>
> > Is there a way to call a private sub from another module? I am trying to have
> > the private sub not visible in the Macro selection, but I can't call it from
> > another module by having it private.

 
Reply With Quote
 
=?Utf-8?B?SkBZ?=
Guest
Posts: n/a
 
      13th Jul 2007
Genius!

"Mike" wrote:

> Run "myMacroName"
>
> "J@Y" wrote:
>
> > Is there a way to call a private sub from another module? I am trying to have
> > the private sub not visible in the Macro selection, but I can't call it from
> > another module by having it private.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call a public module macro in private module macro emmanuel Webmaster / Programming 1 13th May 2011 06:34 PM
Call Private Sub From Different Module Richard Microsoft Excel Programming 7 9th Oct 2009 03:42 PM
Improve method of calling a private function in a private module XP Microsoft Excel Programming 1 30th Apr 2008 06:41 PM
Can't "Call" Error Handler in Standard Module from Form Module =?Utf-8?B?Sm9obiBE?= Microsoft Access VBA Modules 8 21st Apr 2007 07:24 PM
Call Private Function from ThisWorkbook module Bob Phillips Microsoft Excel Programming 3 25th Feb 2004 02:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:07 PM.