G Guest Jan 31, 2004 #1 I been looking but I cannot find out how to change a date in a textbox using a spinbutton. I appreciate your help on this matter.
I been looking but I cannot find out how to change a date in a textbox using a spinbutton. I appreciate your help on this matter.
B Bob Phillips Jan 31, 2004 #2 Make sure that you put a date string in the textbox on itiliaisation, and this spin code will work it Private Sub SpinButton1_SpinUp() TextBox1.Text = Format(CDate(TextBox1.Text) + 1, "dd mmm yyyy") End Sub Private Sub SpinButton1_SpinDown() TextBox1.Text = Format(CDate(TextBox1.Text) - 1, "dd mmm yyyy") End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) Gheezer said: I been looking but I cannot find out how to change a date in a textbox Click to expand... using a spinbutton. I appreciate your help on this matter.
Make sure that you put a date string in the textbox on itiliaisation, and this spin code will work it Private Sub SpinButton1_SpinUp() TextBox1.Text = Format(CDate(TextBox1.Text) + 1, "dd mmm yyyy") End Sub Private Sub SpinButton1_SpinDown() TextBox1.Text = Format(CDate(TextBox1.Text) - 1, "dd mmm yyyy") End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) Gheezer said: I been looking but I cannot find out how to change a date in a textbox Click to expand... using a spinbutton. I appreciate your help on this matter.
B Bob Phillips Jan 31, 2004 #4 You are more than welcome. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct)
You are more than welcome. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct)