+ Reply to Thread
Results 1 to 9 of 9

Ensuring textbox has specified number of digits

Hybrid View

  1. #1
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Ensuring textbox has specified number of digits

    Perhab like this
    Or you can do using textbox_upterUpdate
    private sub textbox1_change()
    Dim t$,t1$
    If isnumeric(textbox1.value) = true then 
      t = textbox1.value
      t1 = 000000
      If len(t1) > len(t) then
        Textbox1.value = StrReverse(Replace(strReverse(t1),0,t,1,len(t)))
      End if
    End if
    End sub
    Last edited by daboho; 11-07-2018 at 06:48 PM.

+ 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] Limit number entry in Userform TextBox to exactly 6 digits
    By Twaddy006 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2014, 10:53 AM
  2. [SOLVED] VBA to convert cell to text and ensuring 7 digit number all along in entire column.
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-19-2013, 09:35 AM
  3. [SOLVED] Wrong calculation results in userform textbox when using more than 3 digits for a number
    By Shacker in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-06-2013, 03:33 PM
  4. Replies: 5
    Last Post: 12-08-2008, 11:47 AM
  5. Ensuring one number is a whole number greater than the other
    By key in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-15-2008, 01:39 PM
  6. [SOLVED] Digits in textbox's
    By Greg B in forum Excel General
    Replies: 4
    Last Post: 09-04-2005, 02:05 PM
  7. Digits in textbox's
    By Greg B in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-04-2005, 02: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