K
K1KKKA
Hi all,
HYCH with this
Am using the form below, but did not want the date entered into
textbox2, would prefer that the current date is displayed and have the
textbox disabled..
I know how to accomplish the disabled bit, but am a little stuck with
regards the date issue,
tried to format "=today()" but to no avail,
Would it require a 'userform initiate sub' command to accomplish
this ?
code attached
Private Sub CmdAdd_Click()
Dim ws As Worksheet
Set ws = Worksheets("All Deals")
ws.Cells(2500, 1).Value = Me.TextBox1.Value
ws.Cells(2500, 2).Value = Format(Me.TextBox2.Value, "today()")
ws.Cells(2500, 3).Value = Me.TextBox3.Value
Me.TextBox1.Value = ""
Me.TextBox3.Value = ""
Me.TextBox2.Value = ""
Me.TextBox1.SetFocus
Unload Me
End Sub
Private Sub CmdClose_Click()
Unload Me
End Sub
Steve
HYCH with this
Am using the form below, but did not want the date entered into
textbox2, would prefer that the current date is displayed and have the
textbox disabled..
I know how to accomplish the disabled bit, but am a little stuck with
regards the date issue,
tried to format "=today()" but to no avail,
Would it require a 'userform initiate sub' command to accomplish
this ?
code attached
Private Sub CmdAdd_Click()
Dim ws As Worksheet
Set ws = Worksheets("All Deals")
ws.Cells(2500, 1).Value = Me.TextBox1.Value
ws.Cells(2500, 2).Value = Format(Me.TextBox2.Value, "today()")
ws.Cells(2500, 3).Value = Me.TextBox3.Value
Me.TextBox1.Value = ""
Me.TextBox3.Value = ""
Me.TextBox2.Value = ""
Me.TextBox1.SetFocus
Unload Me
End Sub
Private Sub CmdClose_Click()
Unload Me
End Sub
Steve