Inserting and formating date with userform

Scencea Posts 6 Registration date Monday August 14, 2017 Status Member Last seen August 18, 2017 - Updated on Aug 18, 2017 at 09:10 AM
 Blocked Profile - Aug 18, 2017 at 06:37 PM

I am trying to Insert a date with a Textbox in a Userform.

It should have this format: Friday, 18.08.2017.

This entered Date is used in a Formula which I didn't define via vba.

The Formula is:


How do I insert the date, that it can be used with my formula?

My code so far:

Private Sub CommandButton1_Click()

zeile = Cells(Rows.Count, 1).End(xlUp).Row + 1

Cells(zeile, 1) = ComboBox1.Text
Cells(zeile, 2) = TextBox1.Text
Cells(zeile, 3) = ComboBox2.Text
Cells(zeile, 4) = ComboBox3.Text
Cells(zeile, 5) = Format(TextBox2.Text, "dddd,d mmmm yyyy")
Cells(zeile, 8) = TextBox3.Text



1 response

Try this:

Cells(zeile, 5).NumberFormat = "dddd,"
Cells(zeile, 5) = TextBox2.Text

This is untested, but it should do what you are expecting.

It's kind of fun to do the impossible! -Walter Elias Disney