Recalling last selected values in a text or combo box

Brucea

New Member
Joined
May 25, 2007
Messages
40
I have a user form which has text boxes and a combo box on it. I want to recall whatever text (text boxes) and value from a list (combo box) the user selected the last time the macro was run. My idea is to store that information in a cell on a hidden worksheet called "programing". My guess there is probibly a better way to do this with code. Is there??
Thanks
Bruce
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Something like this :-
Code:
Private Sub ComboBox1_Change()
    DATA_TO_SHEET
End Sub
'------------------------------------------------
Private Sub CommandButton1_Click()
    DATA_TO_SHEET
End Sub
'-------------------------------------------------
Private Sub DATA_TO_SHEET()
    With Worksheets("Programming")
        ' get next row
        rw = .Range("A65536").End(xlUp).Row + 1
        .Cells(rw, 1).Value = TextBox1.Value
        .Cells(rw, 2).Value = ComboBox1.Value
    End With
End Sub
'-----------------------------------------------------
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top