<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
I have a form named “fOptions”.
On fOptions I have a frame control named “frResolution”.
In frResolution are two option buttons named “obYes” and “obNo”.
<o> </o>
When the form was created, I set the obNo,value = FALSE and the obYes.value = TRUE which causes the obYes control to appear selected on the form.
<o> </o>
When the form is displayed the user may choose to click on the obNo control which will change its value to TRUE and the obYes control’s value to FALSE.
<o> </o>
Is there a way to save the obYes and obNo values in the controls so that the next time the control is started the new value appears?
<o> </o>
I am guessing that the code would look something like:
<o> </o>
{/CODE}
<o> </o>
‘Unload the form
Unload fOptions
<o> </o>
‘Select the form via the VBA environment
With Application.VBE .ActiveVBProject .VBComponents("fOptions")
‘Activate the form
.Activate
'Store the obYes value
.frResolution.obYes.Properties("Value") = fOptions.obYes.Value
<o> </o>
'Store the obNo value
.frResolution.obNo.Properties("Value") = fOptions.obNo.Value
End With
<o> </o>
Thisworkbook.Save
Thisworkbook.Quit
{/End Code}
I have a form named “fOptions”.
On fOptions I have a frame control named “frResolution”.
In frResolution are two option buttons named “obYes” and “obNo”.
<o> </o>
When the form was created, I set the obNo,value = FALSE and the obYes.value = TRUE which causes the obYes control to appear selected on the form.
<o> </o>
When the form is displayed the user may choose to click on the obNo control which will change its value to TRUE and the obYes control’s value to FALSE.
<o> </o>
Is there a way to save the obYes and obNo values in the controls so that the next time the control is started the new value appears?
<o> </o>
I am guessing that the code would look something like:
<o> </o>
{/CODE}
<o> </o>
‘Unload the form
Unload fOptions
<o> </o>
‘Select the form via the VBA environment
With Application.VBE .ActiveVBProject .VBComponents("fOptions")
‘Activate the form
.Activate
'Store the obYes value
.frResolution.obYes.Properties("Value") = fOptions.obYes.Value
<o> </o>
'Store the obNo value
.frResolution.obNo.Properties("Value") = fOptions.obNo.Value
End With
<o> </o>
Thisworkbook.Save
Thisworkbook.Quit
{/End Code}