ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   different value for setting with breakpoint vs regular running code (https://www.excelbanter.com/excel-programming/444298-re-different-value-setting-breakpoint-vs-regular-running-code.html)

daddy-o

different value for setting with breakpoint vs regular running code
 
Thanks Mick. The situation is confusing at best - thanks for taking a stab at it.

I think I understand what you're getting at. Essentially, if conditions are one way, change the secondary axis, if they are another way, change the primary axis. Not a bad idea. The issue is that I have no way of testing or recognizing what condition I am in.

When it comes down to it, I'm grabbing the min of the primary axis, and setting the min of the secondary axis to that same value. Somehow, however, on certain users' machines, when the code is finished running, they get a chart with axes with different min's.

So, I stepped into the code to investigate why. I came upon the line of code which "should" actually set the min's equal to each other. I discovered that if I put a breakpoint anywhere before this line of code, and then press F5 (having done nothing else), I get axes with the same min value. If there is no breakpoint, or it comes after the said line of code, then I get axes with different min's.

I went even further, and verified that the said line of code actually picks up a different value for the min of the primary axis depending on where/if there is a breakpoint.

I don't know if that was any clearer. Any ideas anyone?

Tyler

Clif McIrvin[_3_]

different value for setting with breakpoint vs regular running code
 
"daddy-o" wrote in message
...
Thanks Mick. The situation is confusing at best - thanks for taking a
stab at it.

I think I understand what you're getting at. Essentially, if conditions
are one way, change the secondary axis, if they are another way, change
the primary axis. Not a bad idea. The issue is that I have no way of
testing or recognizing what condition I am in.

When it comes down to it, I'm grabbing the min of the primary axis, and
setting the min of the secondary axis to that same value. Somehow,
however, on certain users' machines, when the code is finished running,
they get a chart with axes with different min's.

So, I stepped into the code to investigate why. I came upon the line of
code which "should" actually set the min's equal to each other. I
discovered that if I put a breakpoint anywhere before this line of code,
and then press F5 (having done nothing else), I get axes with the same
min value. If there is no breakpoint, or it comes after the said line
of code, then I get axes with different min's.

I went even further, and verified that the said line of code actually
picks up a different value for the min of the primary axis depending on
where/if there is a breakpoint.

I don't know if that was any clearer. Any ideas anyone?

Tyler

------

Nice job of describing your situation. A guess:

Is the axis min stipulated, or set to auto?


--
Clif McIrvin

(clare reads his mail with moe, nomail feeds the bit bucket :-)



Vacuum Sealed[_2_]

different value for setting with breakpoint vs regular running code
 
Tyler

you could have a user response set the path as to what the user will see and
how the code reacts....

ie
Dim MyParameter as Integer

Your Parameter message could =("Select Axis to Set", [Min] or [Max])

If MyParameter = [Min] Then
Path_1
Else
Path_2
End IF

Something to consider
Cheers
Mick




All times are GMT +1. The time now is 04:44 AM.

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