![]() |
|
#1
|
||||
|
||||
![]()
I'd go with the content controls. See: https://www.msofficeforums.com/word-...html#post33489
You might even find a lot of the work's been done for you...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
Hi Paul,
thanks a lot for your answer / link. I stepped through the code and unsterstand that you have to leave the selected control to trigger any further action. But I'm sure: being used to the ActiveX click event for many, many years, 'my guys' won't accept the next button to be selected instead of the one they just clicked. Is there a chance to return to the control control just clicked (simulate the long-known radio button behaviour)? I tried with a bookmark on entry, but that - of course - fails, as each on entry creates a new bookmark. How can I bookmark the last (user) selected content control and then return to it? Again thanks for your help ![]() NP |
#3
|
||||
|
||||
![]() Quote:
Quote:
That said, adding a bookmark isn't at all difficult. For example, after: If ContentControl.Type = wdContentControlCheckBox Then in the 'ContentControlOnExit' macro, you could insert: ActiveDocument.Bookmarks.Add Name:="LastUpdate", Range:=ContentControl.Range.Characters.Last.Next.N ext Note that the same bookmark name is used in each case. Of course, you'd probably want to add some extra logic to test whether the exit state was different to the entry state. Just adding the above on its own will bookmark any checkbox you exit. Adding the logic would require modifying the ContentControlOnEnter macro to capture the entry state so it can be tested before doing the update.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]()
Good morning,
I hope, this post will help to understand my problem/appraoch. That's what I did: I downloaded the linked file, did nothing but protect the file (allow form fields only) and clicked some check boxes. The protection makes the selection change from the just selected check box to the next check box. This automatic 'change selection' behaviour triggers the further actions. Basicly perfect, BUT I'd like to have the just selected check box to be selected (again): 1. user clicks (selects) check box which leads to 2. an automatic selection change (to next check box) as the document is protected 3. then back to previous check box to pretend an ActiveX radio button behavior. I simply do not know to return to (address) the previous check box. Hope it's a bit clearer now. NP Last edited by NobodysPerfect; 05-26-2014 at 11:35 PM. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
activex command buttons and text boxes | TRG | Word | 0 | 02-03-2012 09:18 AM |
![]() |
markg2 | Office | 1 | 08-04-2011 06:09 AM |
![]() |
AMD2800 | Excel Programming | 6 | 05-26-2011 07:47 AM |
example of radio buttons in for data entry? | derohanes | Excel | 1 | 03-05-2011 09:37 AM |
![]() |
Niros | Excel | 1 | 11-24-2005 09:58 AM |