HURTMYPONY
Board Regular
- Joined
- Oct 27, 2003
- Messages
- 159
Hello, all!
I have an input box with two required entries - "Date" and "New or Used".
I would like the InputBox to use the last values the user entered for both entries as the default value for the InputBox the next time the InputBox is called.
It only has to remember these defaults until the user changes one or both or the workbook is closed.
Is this possible?
Thank you for the help.
My InputBox code is below for reference....
I have an input box with two required entries - "Date" and "New or Used".
I would like the InputBox to use the last values the user entered for both entries as the default value for the InputBox the next time the InputBox is called.
It only has to remember these defaults until the user changes one or both or the workbook is closed.
Is this possible?
Thank you for the help.
My InputBox code is below for reference....
VBA Code:
Sub BBInsertFill()
Dim dt As String
Dim tp As String
LR = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
dt = InputBox("Enter Date", "DATE")
tp = InputBox("New or Used?", "N/U")
If dt = "" Then Exit Sub
Columns(3).Insert
Range("C2") = dt
ActiveSheet.Range("C2:C2").Copy ActiveSheet.Range("C2:C" & LR)
Columns(4).Insert
Range("D2") = tp
ActiveSheet.Range("D2:D2").Copy ActiveSheet.Range("D2:D" & LR)
ActiveSheet.UsedRange.Select
End Sub