+ Reply to Thread
Results 1 to 4 of 4

Set Textbox to "00:00:00" format

  1. #1
    Registered User
    Join Date
    03-24-2018
    Location
    Philippines
    MS-Off Ver
    MS Office 2010
    Posts
    2

    Set Textbox to "00:00:00" format

    Hi guys! I am new to vba projects. I am currently creating a userform that will show the value of a specific cell in the "Timer" sheet into the textbox1 in my userform. The cell contains time. However, whenever I try to run the userform the textbox wont show the value of the cell in "00:00:00" format. Please check the codes I'm working on below:

    Please see codes below:
    Please Login or Register  to view this content.
    [/I]
    The cell shows:

    T1.PNG

    then textbox1 in userform shows:

    T2.PNG

    I already tried adding: Textbox1.value = Format("00:00:00") in the vba but it is not working. It tends to show the value of textbox1 as "12:00:00 AM"



    I hope you can share your thoughts with me.
    Last edited by AliGW; 03-25-2018 at 05:47 PM. Reason: Additional Info

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Set Textbox to "00:00:00" format

    Sample code:
    Please Login or Register  to view this content.
    Results in this:

    TimeInUserFormTextBox.jpg



    Welcome to the foum


    IMPORTANT

    Please click Edit Post on your first post and attach code tags around your code
    thanks

    Extract from forum rules
    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kev_; 03-25-2018 at 02:15 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Registered User
    Join Date
    03-24-2018
    Location
    Philippines
    MS-Off Ver
    MS Office 2010
    Posts
    2

    Re: Set Textbox to "00:00:00" format

    Thanks Kev_! This is perfect. You saved me. Anyway, I already edited my post.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Set Textbox to "00:00:00" format

    You did not add the code tags correctly. I have done it for you this time.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Format number as time ("h:nn") within a textbox
    By forrestgump1980 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-23-2015, 12:50 PM
  2. Geting headick to Format(Now, "dd.mm.yyyy hh:mm") inside a userform textbox!
    By Reemet in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-11-2014, 10:29 AM
  3. [SOLVED] Excel glitch? (Userform Textbox = Format, "Date")
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-13-2013, 01:47 PM
  4. [SOLVED] UserForm - TextBox = Format("yyyy/mm/dd")
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2013, 12:16 PM
  5. Date format of just "st" "nd" "rd" and "th" with text included
    By notrandom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-10-2013, 05:45 PM
  6. Replies: 2
    Last Post: 11-01-2012, 04:35 PM
  7. Textbox Lost Functionality - '=EMBED("Forms.TextBox.1","")' missing
    By JoeByrne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2010, 05:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1