There is a tab in my worksheet with over 20 buttons. They are hidden and unhidden by one control toggle button. In 2003 the control button, with a label of "Unprotect", executes to unprotect the worksheet and unhide all the other buttons. It then shifts its label to be "Protect". When the Protect button is executed, it hides all the other buttons and protects the worksheet and resets the label back to "Unprotect". At no time does the control button disappear. But in 2007, it is hidden and if I change the property of the button to be visible, it does appear. But as soon as I click it again, it disappears again until I edit its property again.
Can any one explian what the change is between 2003 to 2007 which is causing this irratating behaviour and how to fix it.
Below are the applicable code segments for the button:
Dim wksAgentKRIOAssessment As Worksheet
Dim objButton As OLEObject
Set wksAgentKRIOAssessment = ActiveSheet
'
If UnProtectProtect.Value = True Then
UnProtectProtect.Caption = "Protect"
... some stuff is executed ...
'Unhide Buttons
For Each objButton In wksAgentKRIOAssessment.OLEObjects
objButton.Visible = Not objButton.Visible
Next objButton
Else
UnProtectProtect.Caption = "UnProtect"
... some stuff is executed ...
'Hide Buttons
For Each objButton In wksAgentKRIOAssessment.OLEObjects
objButton.Visible = Not objButton.Visible
Next objButton
End If
End Sub
Can any one explian what the change is between 2003 to 2007 which is causing this irratating behaviour and how to fix it.
Below are the applicable code segments for the button:
Dim wksAgentKRIOAssessment As Worksheet
Dim objButton As OLEObject
Set wksAgentKRIOAssessment = ActiveSheet
'
If UnProtectProtect.Value = True Then
UnProtectProtect.Caption = "Protect"
... some stuff is executed ...
'Unhide Buttons
For Each objButton In wksAgentKRIOAssessment.OLEObjects
objButton.Visible = Not objButton.Visible
Next objButton
Else
UnProtectProtect.Caption = "UnProtect"
... some stuff is executed ...
'Hide Buttons
For Each objButton In wksAgentKRIOAssessment.OLEObjects
objButton.Visible = Not objButton.Visible
Next objButton
End If
End Sub