Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Paste TextBox value to worksheet with specific format

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Paste TextBox value to worksheet with specific format

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")



"Patrick C. Simonds" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If A1 = 4, cut and paste a2:a227 to a specific worksheet Mark B. Excel Worksheet Functions 2 March 17th 09 05:16 PM
Copy, Paste in a specific format DB Excel Discussion (Misc queries) 0 May 2nd 07 07:47 PM
Copy / Paste between workbooks into a specific worksheet query?! [email protected] Excel Programming 2 January 15th 07 05:31 PM
cut and paste specific record on same worksheet violet Excel Programming 8 September 29th 06 01:02 PM
Userform Textbox multiline Vs format in worksheet Jim May Excel Programming 4 October 16th 05 10:15 PM


All times are GMT +1. The time now is 11:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"