+ Reply to Thread
Results 1 to 5 of 5

Format textbox to show Minutes & Seconds

  1. #1
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Format textbox to show Minutes & Seconds

    Hi,

    I have a userform where I am entering minutes and seconds and then transfer those to my spreadsheet. When they come back to the spreadsheet the numbers are not formatted correctly. In the textbox I enter 2 minutes and 35 seconds: 2:35

    When I pull it back to the textbox, I need it to be formatted the same way. How do I do this?

    Thanks

  2. #2
    Registered User
    Join Date
    04-29-2011
    Location
    islip, ny
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Format textbox to show Minutes & Seconds

    Format the range you are putting stuff in with 'special' formatting of "mm:ss" ? (Not through VBA, but through the sheet formatting)

  3. #3
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Format textbox to show Minutes & Seconds

    Thanks for the reply... I have tried that, but 02:35 shows back to my textbox as 1.79398148148148

  4. #4
    Registered User
    Join Date
    04-29-2011
    Location
    islip, ny
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Format textbox to show Minutes & Seconds

    Do you mean textbox in the userform? So then you would need the userform formatted in the same fashion...?

    UserForm2.TextBox2.Value = Format(Time, "mm:ss")

    You can throw that in as a uhh... as a sub that runs every time the value of the textbox changes -- to ensure it always has the perfect format. I'm sorry I can't get more specific, I'm really not good at this stuff; I'm very learning

  5. #5
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: Format textbox to show Minutes & Seconds

    Thanks... but still same result. The cell value is changed to mm:ss but in the formula bar it still shows "12:02:35 AM". I added your code and still the same result. I think I am starting to go nuts.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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