• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help with Textbox Time Display

Hello. I need help with the following thing....I have made a small file to set an specific time or ETA for work stuff. My problem is that I can not make the TextBoxes to display the time format. Instead of displaying what I need(Time Format), it displays a series of long and extended numbers. Is there the possibility to have a code for the textboxes to display the time format. If if could be AM/PM time, it would be amazing.
I am sending the small file and some pictures of the mistake and the code I am using in the userform.

Code:
Private Sub CommandButton1_Click()
Worksheets("Locator").Range("B3").Value = TextBox2.Text
TextBox3.Text = Sheets("Locator").Range("B4").Value

End Sub

Private Sub UserForm_Initialize()
'Displays the time of correponding cells
TextBox1.Text = Sheets("Locator").Range("B2").Value
TextBox2.Text = Sheets("Locator").Range("B3").Value
TextBox3.Text = Sheets("Locator").Range("B4").Value
End Sub
Thank you so much in advance for all the usually given help.



Fred
 

Attachments

Marc L

Excel Ninja
Is there the possibility to have a code for the textboxes to display the time format. If if could be AM/PM time, it would be amazing.
Hi, if the cells are well formatted so obviously use at least the cell Text property rather than the Value property ! …​
 
Yesssssssssssssssssssssssssssss That is what I needed. Thank you so much. Amazing. I do not have words to thank you again
 
Top