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: 6
Default variable scoping - constants going out of scope - circular references

My global variables seem to be going out of scope. I keep reverting to
using a temporary cell - which seems ridiculously inefficient and messy.


I have a circular reference I am trying to avoid by using a boolean
variable, declared in ThisWorkbook:
Public bChangingDate As Boolean

When I begin changing the dates on my sheets, to avoid a circular
reference (I have a watch setup on this cell that first checks for this
boolean) I set it to True.

I run a couple of procedures within this block of code, but somehow by
the time it is finished my bChangingDate has returned to Empty, thus
entering my code into a circular reference.

I am now again stuck with finding a temporary hiding cell to put a value
into, so that it will 'stick'.

Any advice?

M.I.
 
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
scope/ lifetime of variable jeffP Excel Programming 5 September 19th 04 05:25 AM
scope/ lifetime of variable Norman Jones Excel Programming 0 September 18th 04 12:55 AM
Variable Scope Kevin Excel Programming 1 September 14th 04 07:05 PM
Variable scope TonyM Excel Programming 5 April 24th 04 01:02 PM
Scope of a public variable Jos Vens Excel Programming 0 November 24th 03 10:08 AM


All times are GMT +1. The time now is 06:36 PM.

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"