01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23 |
|
Private Sub btn_2_Click()
Dim sEingabe As String, cErgebnis As Currency, vProvision As Variant
Provision = 0.05
Do
sEingabe = InputBox("Bitte eine Zahl eingeben.")
If StrPtr(sEingabe) = 0 Then Exit Sub ' Abbrechen geklickt => raus
If Val(sEingabe) <> 0 Then Exit Do
MsgBox "Bitte geben Sie eine Zahl und keine anderen Zeichen ein!!!", vbCritical
Loop
cErgebnis = Val(sEingabe) / (1 + vProvision)
If Me.chk_box1 = True Then
MsgBox "Der Wert: " & sEingabe & " + 5% Provision lautet: " & cErgebnis, vbInformation
Else
MsgBox "Ihr Wert ohne Provision beträgt: " & sEingabe, vbInformation
End If
End Sub
|