[RESOLVED] SaveAllSettings w/ Ctrl Array?
how could i make a control array to save all the settings on a form.
it is mostly options, so i would imagine
if type of x is option then savesetting (yadda yadda)
my question is what is the actual wording i need for this.
i need to store the values of the options, text of textboxes, and position of a scrollbar.
is there any way to automate this without having 30 lines of savesettings?
just a short example that would iterate all options would set me in the right direction.
thanks!
Re: SaveAllSettings w/ Ctrl Array?
Something like this?
VB Code:
Private Sub SaveAllSettings()
Dim ctl As Control
For Each ctl In Me.Controls
Select Case True
Case TypeOf ctl Is OptionButton
' Save Option Settings
Case TypeOf ctl Is TextBox
' Save Text
Case TypeOf ctl Is VScrollBar, TypeOf ctl Is HScrollBar
' Save scrollbar
End Select
Next ctl
End Sub
Re: SaveAllSettings w/ Ctrl Array?