|
|
|
|
|
|
Har du set hvor smart det kan være?
|
|
SmartOffice - KeyPressNumbersOnly
Bruges til at sikre, at brugeren kun indtaster tal i en TextBox
Eksempel 1
Public Sub KeyPressNumbersOnly(ByVal KeyAscii As MSForms.ReturnInteger)
'Flemming Vadet, April 2000, fv@smartoffice.dk
'eks. i KeyPress subben: KeyPressNumbersOnly KeyAscii
Select Case KeyAscii
Case vbKey0 To vbKey9, vbKeyBack
Case Else
Beep
KeyAscii = 0
End Select
End Sub
Opret en Userform, og indsæt en TextBox herpå
Test 1
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
KeyPressNumbersOnly KeyAscii
End Sub
|
|
|
|
Smart Data Management
Compare 2 Columns
Excel Super- Subscript
Teachers Excel Tools
|
|
|
|
|
|