I am working with VBA in a Word document. I have a form that contains a message and up to three buttons beneath the message so the user can choose what to do. I want to make one of the buttons be the default button that I specify with the integer variable DefaultButton. None of the buttons has a set default, and I am trying to use this routine to specify which button should be the default:
Select Case DefaultButton
Case Is = 0
frmJRABox.cbButton1.Default = True
Case Is = 1
frmJRABox.cbButton2.Default = True
Case Is = 2
frmJRABox.cbTranslate.Default = True
When I step through the code it goes to the specified line, but the result is nil. Nothing gets specified as the default button.
Can anyone suggest what I am doing that prevents the above code from working?
I’ll try any suggestions. Thanks for any help.