Hi all
I'm writing a code for a user form in VBA excel.
I have two columns of text boxes, and what I would like is to enter dates in the left column, and then that date minus two dates, should appear automatically in the right column but I want to be able to amend that manually.
I tried
If IsDate(TextBox8.Text) Then
TextBox8.Text = CDate(TextBox28.Text) - 2
End If
but that doesn't seem to work. any ideas?
thanks
I'm writing a code for a user form in VBA excel.
I have two columns of text boxes, and what I would like is to enter dates in the left column, and then that date minus two dates, should appear automatically in the right column but I want to be able to amend that manually.
I tried
If IsDate(TextBox8.Text) Then
TextBox8.Text = CDate(TextBox28.Text) - 2
End If
but that doesn't seem to work. any ideas?
thanks