Hi Rory,
Morning. Thanks fort he reply.
I have been having a play after what you said...googling etc on Loads etc.
Sorry I am still totally ignorant with user Forms. I still have not been able to understand your question.
_.............
These bits are towards the start of the Worksheet_Change code:
Code:
'Part 0.5 )RoryA UserForm http://www.excelforum.com/excel-programming-vba-macros/1086822-contents-of-an-array-derived-from-a-macro-into-a-fixed-display-window-user-form.html#post4152417
Static fm As ufResults: If fm Is Nothing Then Set fm = New ufResults: If Not fm.Visible Then fm.Show False 'make sure UserForm is always there,
They seem to make the user Form Pop Up…. From then on it always there to “see.”
If I check maybe the first option button “StatusBarNormal”. Then initiate a run of the Worksheet_Change code a couple of times ( any entry alongside a Food in column C ),
I see this and all is well
Attachment 459606
_..................................
I then check the second two boxes as shown below
Attachment 459605
After that my two workarounds work, ( detailed in post #1 -
For example you see in the second Image my Global variable set in the Refresh Check Button code has changed to True ). So somehow those Button check boxes must have been “read”. But I cannot seem to put any code line anywhere ( in this code or elsewhere ) that returns me anything other than False for
ufResults.Refresh.Value
or
ufResults.OptionButton2.Value
( checking the value of my Global variable workaround does as I expect. ( I have to recheck that Refresh Button to get it True, but that is how I wrote the code ) )
Sorry it is very difficult to follow this Thread. One case may be where a file is useful! My File is still linked in Post#1 if you had time to check it.
I just added a couple of Debug Lines. They are responsible for the results in the immediate window on those two screen shots
Code:
StatusDeBuger: Dim v: v = ufResults.OptionButton2.Value: Debug.Print "ufResults.OptionButton2.Value "; v
And
Code:
EresDeBuger: v = ufResults.Refresh.Value: Debug.Print "ufResults.Refresh.Value "; v
GlobieDeBuger: v = RefreshCColumn: Debug.Print "Global RefreshCColumn= "; v
Those are at the two points where I want to check to see if the Buttons are checked. That is where I do not understand that I cannot get a True result ever.
( I just reloaded my File with those new Debug lines in, same link as in Post #1 _..
https://app.box.com/s/fpztob9pcp92fl6hh81zgpzumw9ntcp0
_.. )
This is an awkward one to follow, sorry.
Alan
P.s. I have discovered a ( new ) Phenomena, just now! ....
This
Code:
Static fm As ufResults: If fm Is Nothing Then Set fm = New ufResults: If Not fm.Visible Then fm.Show False 'make sure UserForm is always there,
Does not work like this:
Code:
Static fm As ufResults: If fm Is Nothing Then Set fm = New ufResults
If Not fm.Visible Then fm.Show False 'make sure UserForm is always there,
In the first case the second condition is not checked if the first is not met – it ignores the : thing which should tell it there is the next code line!!
Interesting ( But I modified my code to the second case, and it has no effect with my current problem )
_
_Edit.. On Editiing I can no longer see those atttatchments, how poo!
bloody EF Software!!
Bookmarks