My apologies if I phrase this incorrectly, but I have self-taught myself some VBA based on threads here and on a few other forums.
I have a userbox that has textboxes that links to document variables and a checkbox named ChxMultiDef. When I unload the userform, I need a way to save the value of the checkbox so if I reopen the userform, the value of the checkbox comes back. I have found a way to do this for my textboxes/document variables, but not for the checkbox values.
This is what I do for the
For the textboxes/document variables, my code in the "OK" button is:
With ActiveDocument
.Variables("plaintiff").Value = Me.txtPlaintiff.Value
.Range.Fields.Update
End With
Unload me
AND my code in the Userform_initialize is:
With ActiveDocument
Me.txtPlaintiff.Value = .Variables("plaintiff").Value
End With
When I do this, when i unload the userform and then reload it, the textbox information is back. I just cannot figure out how to do the same with the checkbox.
Also, I cannot use the Me.Hide for a long reason that isn't necessary to explain here. And I don't want to save to the registry. When I have looked on excel forums, they seem to save to a hidden cell, but I don't think that works for Word.
Any advice would be greatly appreciated -- I've been pulling my hair out for days on this issue.