LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 345
Default NOT static variable problem

In a module with some 40 procedures I have dim'd a lot of variables
in the declarations section. I am developing this application on a home PC.
It will execute in a networked environment.

NONE of the vars are static. ajcdone is dim'd as string.

in sub "A" I have: ajcdone="y" based on processing status

in sub "B", called in the same 'overall' macro as A above I have:
if ajcjdone < "y" then.....

In my testing I executed sub A. It ended with ajcdone = to "y" BUT,
sub B was not executed due to other logic, and the 'overall' macro was
exited.

I diddled with the worksheets involved for a couple of minutes and then
independantly executed sub B, NOT expecting ajcdone to have any value,
but be null. Well, surprise surprise.

ajcdone WAS = to "y". How come?
Is this just bad luck with a memory location? or am I doing something wrong?

I suppose I can stick a value in a cell in one of the involved worksheets
and test it, but would rather not.

Thanks for you help.
Neal



--
Neal Z
 
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
Concatenating two variable fields into a static length text field Young Programmer Lad Excel Worksheet Functions 2 April 17th 09 05:39 PM
Static Date and Time code problem Laura Excel Discussion (Misc queries) 12 August 31st 07 07:04 AM
STATIC VARIABLE NOT AVAILABLE IN ANOTHER MODULE CAPTGNVR Excel Discussion (Misc queries) 2 February 1st 07 07:30 PM
Excel static current date/time problem hpmted Excel Worksheet Functions 1 March 30th 05 09:12 PM
Static Variable Todd Huttenstine Excel Programming 7 May 7th 04 11:16 AM


All times are GMT +1. The time now is 06:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"