+ Reply to Thread
Results 1 to 2 of 2

Convert Text Time From A Userform Textbox to A Time Value

  1. #1
    Forum Contributor
    Join Date
    06-15-2009
    Location
    Ontario, canada
    MS-Off Ver
    Office 365
    Posts
    371

    Convert Text Time From A Userform Textbox to A Time Value

    I have this line of code in which I am trying to convert a userform textbox (text) timne value to an actual time value.

    In my example, me.uf9a_tb_cstart = "7:00 am". This code has a result of 0:00, not the 7:00 expected.

    Please Login or Register  to view this content.
    I also used CLng and had similar results.

    Can anyone suggest the proper route I should be taking to resolve this?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Convert Text Time From A Userform Textbox to A Time Value

    Try this,.

    Please Login or Register  to view this content.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Replies: 15
    Last Post: 08-23-2017, 03:32 PM
  2. Excel convert Text time formatted 10h 58m to time so I can sum together
    By slinka in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-04-2016, 10:17 AM
  3. [SOLVED] Easy One - Convert user text in UserForm TextBox to Currency
    By DonJuan85 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2015, 01:42 PM
  4. Easy One - Convert user text in UserForm TextBox to Currency
    By DonJuan85 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2015, 07:00 PM
  5. Time stored as text. How can I convert to data and time?
    By matthewbutterworth in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-07-2013, 10:19 AM
  6. Time in Userform -> textbox
    By dk-iceman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2008, 01:59 AM
  7. [SOLVED] convert time imported as text to time format for calculations
    By batfish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-27-2005, 07:05 PM

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