Can you help me with this

TEXT will not accept the number zero and negative numbers.

Recommended Answers

Please more detail. What you mean about TEXT? it's Textbox?

Jump to Post

If it textbox you can use ascii to trap zero and negative sign.

Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 45, 48  
    KeyAscii = 0
End Select
End Sub
Jump to Post

All 5 Replies

Please more detail. What you mean about TEXT? it's Textbox?

If it textbox you can use ascii to trap zero and negative sign.

Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 45, 48  
    KeyAscii = 0
End Select
End Sub

Apart from that i'm a newbie here,i'm a bit lost too.

yup its a textbox

yup its a textbox

I already answer your question in my second post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.