View Single Post
 
Old 04-18-2024, 04:57 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This would really be better if you were using Content Controls. I think you should either:
1. Change to content controls or
2. Change your checkboxes to option buttons

The only benefit of using legacy fields over Content Controls is the availability of legacy Option buttons and the ability to group them so only one can be turned on at a time. You are trying to replicate that built-in functionality with code because you chose a checkbox instead of an option button.

But doing it with the legacy checkbox field, for that macro you just need a single line
Code:
Private Sub LPja_Click()
  ActiveDocument.Bookmarks("TabelLP").Range.Font.Hidden = Not LPja.Value
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote