Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: [User form] input text box, on tab fills to 5 figures 321 -

  1. #11
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You will need to set your TabIndex correctly though (found in the properties window). Also, you will have to set
    other textboxes properties to:

    MaxLength = 5
    AutoTab = true

  2. #12
    Board Regular
    Join Date
    Mar 2002
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Right,

    Now the code for 1 textbox looks like this. The only this which doesn`t work now is skipping to the next textbox if 5 digits are present:

    Private Sub TBL1_Change()
    Worksheets("sheet1").Range("B2").Value = TBL1
    If Not IsNumeric(TBpanel.Value) Then
    MsgBox "Only numeric data is allowed", vbExclamation, "Invalid Entry"
    If Len(TBL1.Text) >= 5 Then TBL2.SetFocus
    End If
    End Sub


    Private Sub TBL1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    L = Len(Me.TBL1.Value)
    If L < 5 Then
    Me.TBL1.Value = Application.Rept("0", 5 - L) & Me.TBL1.Value
    End If
    End Sub

    Does anyone see where it is going wrong?


  3. #13
    Board Regular
    Join Date
    Mar 2002
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    aargg!

    The autotab was on False. Everything works just fine now.
    Thanks so much!

    an honourable mention for Audiojoe, who almost seems to go down by his own enthousiasm. I think I`m going to like this forum a lot!





    [ This Message was edited by: Dinictus on 2002-03-20 08:15 ]

  4. #14
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks man, but what's all this business about me going down on my own enthusiasm? Wouldn't I need to remove a rib first or something?

  5. #15
    Board Regular
    Join Date
    Mar 2002
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Perhaps the expression is wrong. does it mean something mean? I didn`t mean to. I`m not English by the way...

  6. #16
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I was messing about man, don't worry. To "go down on something" kinda means....well....me being a gentleman and all, prevents me from going too much into it. Try eating passion fruit and you'll know what I'm talking about

    [ This Message was edited by: Audiojoe on 2002-03-20 08:46 ]

  7. #17
    Board Regular
    Join Date
    Mar 2002
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    LOL,

    I see. Something essential which has nothing to do with excelling...

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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