Results 1 to 13 of 13

Thread: Texbox - Numbers ONLY - Date

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,446
    Location
    Trap the keypress

    Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
        Select Case KeyAscii
            Case Asc("0") To Asc("9"): 'OK
            Case Else: KeyAscii = 0
        End Select
    End Sub
    as a starter example

    .
    Last edited by Aussiebear; 03-23-2025 at 08:56 AM.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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