ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   variable scoping - constants going out of scope - circular references (https://www.excelbanter.com/excel-programming/312284-variable-scoping-constants-going-out-scope-circular-references.html)

Masa Ito

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.

Bob Phillips[_6_]

variable scoping - constants going out of scope - circular references
 
The code might help.

--

HTH

RP

"Masa Ito" wrote in message
48.16...
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.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com