Paste TextBox value to worksheet with specific format

P

Patrick C. Simonds

How can I make the result placed in rng(1, 13) have the format of
mm/dd/yy? the format of Textbox4 is ddd mmm dd yy.

Private Sub CommandButton1_Click()

Dim rng
Set rng = Cells(ActiveCell.Row, 1)

rng(1, 13).Value = TextBox4.Value 'Date of Contact

Unload Me

End Sub
 
J

JLGWhiz

Try this Patrick. Excel does not like the name of the day as part of the
date group.

rng(1, 13) = Format(Mid(TextBox4.Value, 5), "mm/dd/yy")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Referencing a UserForm 2
Stumped 1
Pasting a date to a cell from UserForm 2
Create a public variable 4
Date value 7
Copy filtered data to sheet 2 1
Hide a TextBox 1
store variables 4

Top