|
| |

Visual-Basic Einsteiger| Re: Keine Ahnung, wie ich das Beschreiben soll | |  | | Autor: Maik Jannasch | | Datum: 31.12.01 11:40 |
| Hallo Dieter oder CyberLord,
ich habe mal alles geändert, was ihr vorgeschlagen habt, aber trotzdem funzt dat ned ... zumindestens die Registerkarte "Kassenabrechnung" !
Der Code lautet:
Private Sub Command1_Click()
Dim eurorueck As Currency
Dim eurobetrag As Currency
Dim eurogabe As Currency
eurobetrag = DM2Euro(Text1.Text) + Val(Replace(Text2.Text, ",", "."))
eurogabe = DM2Euro(Text3.Text) + Val(Replace(Text4.Text, ",", "."))
eurorueck = eurogabe - eurobetrag
lblEuroRückgabe.Caption = Format$(eurorueck, "0.00")
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
lblEuroRückgabe.Caption = ""
End Sub
Private Sub Command3_Click()
Dim dmzwischen As Currency
Dim eurozwischen As Currency
Dim zwischengesamt As Currency
Dim entnahmegruen As Currency
Dim entnahmegrueni As Currency
Dim entnahmerot As Currency
Dim kassenbestand As Currency
entnahmerot = (Val(Text21(0).Text) + Val(Text22(0).Text) + Val(Text23(0).Text) + Val(Text24(0).Text) + Val(Text25(0).Text) + Val(Text26(0).Text)) / 1.95583
entnahmerot = (Val(Text28(0).Text) + Val(Text29(0).Text) + Val(Text30(0).Text) + Val(Text31(0).Text) + Val(Text27(0).Text)) / 1.95583
entnahmegrueni = Val(Text27(0).Text) - entnahmerot
dmzwischen = Val(Text5(0).Text) + Val(Text6(0).Text) + Val(Text7(0).Text) + Val(Text8(0).Text) + Val(Text9(0).Text) + Val(Text10(0).Text) + Val(Text11(0).Text) + Val(Text12(0).Text)
eurozwischen = Val(Text13(0).Text) + Val(Text14(0).Text) + Val(Text15(0).Text) + Val(Text16(0).Text) + Val(Text17(0).Text) + Val(Text18(0).Text) + Val(Text19(0).Text) + Val(Text20(0).Text)
eurogesamt = dmzwischen / 1.95583 + eurozwischen
kassenbestand = 200 - (entnahmegruen + entnahmegrueni)
lblDMZwischenergebnis.Caption = Format$(dmzwischen, "0.00")
lblEuroZwischenergebnis.Caption = Format$(eurozwischen, "0.00")
lblZwischenergenisEuro.Caption = Format$(zwischengesamt, "0.00")
lblEntnahmegrün.Caption = Format$(entnahmegruen, "0.00")
lblEntnahmerot.Caption = Format$(entnahmerot, "0.00")
lblEntnahmegrüni.Caption = Format$(entnahmegrueni, "0.00")
lblAktuellerKassenbestand.Caption = Format$(kassenbestand, "0.00")
End Sub
If Text5(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text6(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text7(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text8(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text9(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text10(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text11(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text12(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text13(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text14(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text15(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text16(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text17(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text18(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text19(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text20(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text21(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text22(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text23(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text24(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text25(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text26(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text27(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text28(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text29(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text30(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text31(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
If Text32(0).Text = "" Then
MsgBox "Eingabe erforderlich!"
Else
End If
Private Sub Command4_Click()
Text5(0).Text = ""
Text6(0).Text = ""
Text7(0).Text = ""
Text8(0).Text = ""
Text9(0).Text = ""
Text10(0).Text = ""
Text11(0).Text = ""
Text12(0).Text = ""
Text13(0).Text = ""
Text14(0).Text = ""
Text15(0).Text = ""
Text16(0).Text = ""
Text17(0).Text = ""
Text18(0).Text = ""
Text19(0).Text = ""
Text20(0).Text = ""
Text21(0).Text = ""
Text22(0).Text = ""
Text23(0).Text = ""
Text24(0).Text = ""
Text25(0).Text = ""
Text26(0).Text = ""
Text27(0).Text = ""
Text28(0).Text = ""
Text29(0).Text = ""
Text30(0).Text = ""
Text31(0).Text = ""
Text32(0).Text = ""
lblDMZwischenergebnis.Caption = ""
lblZwischenergebnisEuro.Caption = ""
lblEuroZwischenergebnis.Caption = ""
lblEntnahmegrün.Caption = ""
lblEntnahmegrüni.Caption = ""
lblEntnahmerot.Caption = ""
lblAktuellerKassenbestand.Caption = ""
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim sMessage As String
Dim sTitle As String
Dim sRetVal As String
sMessage = "Sind Sie sicher das Sie das Programm beenden wollen ?"
sTitle = "Programm beenden ?"
sRetVal = MsgBox(sMessage, vbYesNo, sTitle)
Select Case sRetVal
Case vbYes
Unload Me
End
Case vbNo
Cancel = 1
End Select
End Sub
' Umrechnung DM nach Euro
' autom. Runden auf 2 Nachkommastellen
Public Function DM2Euro(ByVal vDM As Variant) As Currency
Dim curDM As Currency
If VarType(vDM) = vbString Then
curDM = Val(Replace(vDM, ",", "."))
Else
curDM = CCur(vDM)
End If
DM2Euro = Int(curDM / 1.95583 * 100 + 0.5) / 100
End Function
Command 1 - 2 klappt und das Beenden auch. |  |
 | Sie sind nicht angemeldet! Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.
Einloggen | Neu registrieren |
  |
|
Neu! sevPopUp 2.0 
Dynamische Kontextmenüs!
Erstellen Sie mit nur wenigen Zeilen Code Kontextmenüs dynamisch zur Laufzeit. Vordefinierte Styles (XP, Office, OfficeXP, Vista oder Windows 8) erleichtern die Anpassung an die eigenen Anwendung... Weitere InfosTipp des Monats Access-Tools Vol.1 
Über 400 MByte Inhalt
Mehr als 250 Access-Beispiele, 25 Add-Ins und ActiveX-Komponenten, 16 VB-Projekt inkl. Source, mehr als 320 Tipps & Tricks für Access und VB
Nur 24,95 EURWeitere Infos
|
| |
|
Copyright ©2000-2025 vb@rchiv Dieter Otter Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.
Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel
|
|