![]() |
|
#1
|
|||
|
|||
![]()
Hi,
I have a set of dependant content controls (Master and Slave). If Master.text = "NO" then Slave.text is set to "YES", then a msgbox displays and depending on the options selected from the msgbox the doc is disabled from editing and the above content controls are locked from editing aswell. All the code is placed in the "Private Sub Document_ContentControlOnExit". Even though the content controls are locked, a user can still "attempt" to change the text within (which will not change ofcourse), my issue is - when the user steps out of the content control the "Private Sub Document_ContentControlOnExit" is triggered again. How do I stop this or turn it off? Any ideas? |
#2
|
||||
|
||||
![]()
Hi Catty,
Does your 'master' content control have a title or tag? If so, you can add a test of that to your ContentControlOnExit macro so it only runs the update code when that one is exited. Alternatively, you could test the lock status so it only runs the update code when an unlocked one is exited; that's still not going to be satisfactory, though, if you have other unlocked content controls.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hi Paul,
Thanks for the response. I used your advise and put an IF statement on the 'slave' content control to ensure that the ContentControlOnExit event is only triggered when the .ContentControls("Slave").LockContents = False. This works beautifully. ![]() Thanks!! ![]() |
![]() |
Thread Tools | |
Display Modes | |
|