Private Sub Form_Load()
' Load flavors.
Load optFlavor(1)
InitOptionButton optFlavor(1), optFlavor(0), "Vanilla"
Load optFlavor(2)
InitOptionButton optFlavor(2), optFlavor(1), _
"Strawberry"
Load optFlavor(3)
InitOptionButton optFlavor(3), optFlavor(2), "Pistachio"
' Load colors.
Load optColor(1)
InitOptionButton optColor(1), optColor(0), "Green"
Load optColor(2)
InitOptionButton optColor(2), optColor(1), "Blue"
' Select initial options.
optFlavor(3).Value = True
optColor(2).Value = True
End Sub
' Position the OptionButton below opt_above
' in the same container.
Private Sub InitOptionButton(ByVal opt As OptionButton, _
ByVal opt_above As OptionButton, ByVal txt As String)
opt.Container = opt_above.Container
opt.Move opt_above.Left, _
opt_above.Top + opt_above.Height + 120
opt.Caption = txt
opt.Visible = True
End Sub
|