Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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

wrote in message
oups.com...
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
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
public variables johnny Excel Discussion (Misc queries) 7 February 27th 08 03:44 PM
Public variables johnny Excel Discussion (Misc queries) 2 February 24th 08 05:05 AM
Public Variables Jerry McNabb Excel Discussion (Misc queries) 0 February 24th 08 01:26 AM
Public Variables ExcelMonkey[_190_] Excel Programming 5 February 21st 05 10:12 AM
Public Variables Les Gordon Excel Programming 2 November 11th 04 12:29 PM


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

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"