+ Reply to Thread
Results 1 to 2 of 2

Public Variables

  1. #1

    Public Variables

    Running XL 2003 in XP. I'm trying to share a variable between 2 subs,
    each in a different module. Don't I just have to use the Public
    statement? Such as...

    Public dNTP as Date

    The first sub is in Module6 and calls the second sub in Module1. So I
    have the above statement in Module6.

    Any help is greatly appreciated.

    John


  2. #2
    Tom Ogilvy
    Guest

    Re: Public Variables

    At the top of Module 6, outside any sub or function put your declaration

    Public dNTP as Date

    Should be visible to all modules in the same workbook.

    --
    Regards,
    Tom Ogilvy

    <[email protected]> wrote in message
    news:[email protected]...
    > Running XL 2003 in XP. I'm trying to share a variable between 2 subs,
    > each in a different module. Don't I just have to use the Public
    > statement? Such as...
    >
    > Public dNTP as Date
    >
    > The first sub is in Module6 and calls the second sub in Module1. So I
    > have the above statement in Module6.
    >
    > Any help is greatly appreciated.
    >
    > John
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1