E
eklarsen
I posted this earlier and did not get a response, I will try t
clarify..
I am using a userform with listboxes that the user enters data into an
than another userform that returns the calculated results. I would lik
to know the code to retain text that was entered in each listbox (i
the registry or whatever) on the press of an action button.
Here is JW's solution but I get an error improper use of Me function o
something similar when I use it.
'Sub Getdefaults()
' Dim ctl As Control
' Dim Ctrltype As String
' For Each ctl In Me.Controls
'Ctrltype = TypeName(ctl)
'If Ctrltype = "Textbox" Or _
'"Combobox" Or _
'"Optionbox" Or _
'"Checkbox" Or _
'"Spinbutton" Then
'ctl.Value = GetSetting _
'(APPNAME, "Defaults", ctl.Name, ctl.Value)
'End If
'Next ctl
'End Sub
'Sub SaveDefaults()
' Dim ctl As Control
' Dim Ctrltype As String
' For Each ctl In Me.Controls
'Ctrltype = TypeName(ctl)
'If Ctrltype = "Textbox" Or _
'"Combobox" Or _
'"Optionbox" Or _
'"Checkbox" Or _
'"Spinbutton" Then
'SaveSetting APPNAME, _
'"Defaults", ctl.Name, ctl.Value
'End If
'Next ctl
'End Sub
Any thoughts?
Thanks in advanc
clarify..
I am using a userform with listboxes that the user enters data into an
than another userform that returns the calculated results. I would lik
to know the code to retain text that was entered in each listbox (i
the registry or whatever) on the press of an action button.
Here is JW's solution but I get an error improper use of Me function o
something similar when I use it.
'Sub Getdefaults()
' Dim ctl As Control
' Dim Ctrltype As String
' For Each ctl In Me.Controls
'Ctrltype = TypeName(ctl)
'If Ctrltype = "Textbox" Or _
'"Combobox" Or _
'"Optionbox" Or _
'"Checkbox" Or _
'"Spinbutton" Then
'ctl.Value = GetSetting _
'(APPNAME, "Defaults", ctl.Name, ctl.Value)
'End If
'Next ctl
'End Sub
'Sub SaveDefaults()
' Dim ctl As Control
' Dim Ctrltype As String
' For Each ctl In Me.Controls
'Ctrltype = TypeName(ctl)
'If Ctrltype = "Textbox" Or _
'"Combobox" Or _
'"Optionbox" Or _
'"Checkbox" Or _
'"Spinbutton" Then
'SaveSetting APPNAME, _
'"Defaults", ctl.Name, ctl.Value
'End If
'Next ctl
'End Sub
Any thoughts?
Thanks in advanc