Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default How to call a private sub() in another module

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default How to call a private sub() in another module

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default How to call a private sub() in another module

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default How to call a private sub() in another module

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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default How to call a private sub() in another module

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
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
IF Statements-call private sub CrimsonPlague29 Excel Worksheet Functions 0 May 11th 06 04:54 PM
Option Private Module RB Smissaert Excel Programming 5 April 4th 06 04:53 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:10 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"