+ Reply to Thread
Results 1 to 4 of 4

Insert textbox value into another textbox, minus characters

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Insert textbox value into another textbox, minus characters

    I have a time stamp that puts a time stamp in a textbox in the format off "mmddyyyyhmm am/pm"
    I would like to show this in another textbox without the AM/PM (If I remove the am/pm it goes to a 24hr clock which I don't want).

    all I have so far is

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Insert textbox value into another textbox, minus characters

    Me.TextBox6 =TEXT(TextBox1.Value, "dd/mm/yyyy" ) & " " &HOUR(TextBox1.Value)-IF(HOUR(TextBox1.Value)>12,12,0)&":" & MINUTE(TextBox1.Value)
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Re: Insert textbox value into another textbox, minus characters

    I'm getting a Syntax Error

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Insert textbox value into another textbox, minus characters

    Try

    Me.TextBox6 =TEXT(Me.TextBox1.Value, "dd/mm/yyyy" ) & " " &HOUR(Me.TextBox1.Value)-IF(HOUR(Me.TextBox1.Value)>12,12,0)&":" & MINUTE(Me.TextBox1.Value)

+ 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] Link Textbox to cell with more than 255 characters
    By AMSO in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2020, 12:27 PM
  2. [SOLVED] Excel VBA form - textbox to export data over 255 characters from textbox
    By DannyJ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2017, 05:52 AM
  3. [SOLVED] Can anyone tidy my Textbox minus Combobox Please?
    By bralew in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2016, 06:57 AM
  4. Cut textbox string in new strings of 50 characters
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2016, 06:55 AM
  5. [SOLVED] VBA Code for Textbox: First 3 characters Alphabets next 3 characters numeric
    By honger in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-11-2013, 01:05 AM
  6. Textbox greater than 255 characters
    By mojo249 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-16-2010, 08:17 AM
  7. [SOLVED] Textbox: Number of Characters
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2006, 05:12 PM

Tags for this Thread

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