Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    CALL PRIVATE SUB (EXCEL 2002)

    Hi all,

    I know you can call a public sub, but is there a way to call a private sub?

    Thanks,
    Darryl.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: CALL PRIVATE SUB (EXCEL 2002)

    You could turn it Public and the call it with the way to call a public sub...

    Why is it private, if you want to use it publicly?


    Steve

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CALL PRIVATE SUB (EXCEL 2002)

    If you want to know if you can call a private sub that resides in module A from code that resides in module B, the answer is no: the idea of declaring something as private is that you can call it only from within the same module.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •