ergebnis mit € hinterlegen

  • Word

    ergebnis mit € hinterlegen

    Hallo Leute...

    ich hab nen dickes Problem...
    ich hab folgende Rechnung

    Private Sub cmdBerechnen_Click()
    Dim Stückzahl As Integer
    Dim Einzelbetrag As Double


    Visual Basic-Quellcode

    1. 'checken der Mwst
    2. If Me.optMwStKeine.Value = True Then
    3. MsgBox ("Blumen haben einen MwSt-Satz von 7 %")
    4. Me.optMwStKeine.Value = False
    5. Me.optMwSt7.Value = True
    6. End If
    7. If Me.optMwSt19.Value = True Then
    8. MsgBox ("Blumen haben einen MwSt-Satz von 7 %")
    9. Me.optMwStKeine.Value = False
    10. Me.optMwSt7.Value = True
    11. End If
    12. 'Stückzahlüberprüfung
    13. If Me.txtStückzahl.Text = "" Then
    14. MsgBox ("Bitte unbedingt Ihre Stückzahl angeben")
    15. Me.txtStückzahl.SetFocus
    16. Exit Sub
    17. End If
    18. 'Blumensorte
    19. If Me.cboProdukt.Text = "Nelken" Then
    20. Me.txtEinzelbetrag.Value = Format("2", "Currency")
    21. End If
    22. If Me.cboProdukt.Text = "Rosen" Then
    23. Me.txtEinzelbetrag.Value = Format("3", "Currency")
    24. End If
    25. If Me.cboProdukt.Text = "Gerbera" Then
    26. Me.txtEinzelbetrag.Text = Format("2,50", "Currency")
    27. End If
    28. If Me.cboProdukt.Text = "Tulpen" Then
    29. Me.txtEinzelbetrag.Text = Format("1,50", "Currency")
    30. End If
    31. If Me.cboProdukt.Text = "Sonnenblumen" Then
    32. Me.txtEinzelbetrag.Text = Format("5,00", "Currency")
    33. End If
    34. 'berechnen
    35. Dim Summe As Double
    36. Summe = (Me.txtStückzahl.Text * Me.txtEinzelbetrag) / 100 * 107
    37. Me.txtRechnungsbetrag.Text = Format$(Summe, "#,##0.00") 'funktioniert unter Office 2010 nicht
    38. 'wiedergabe mit Currency ebenfalls nicht möglich
    39. ' Currency s.o. kann nicht mit Variable erzeugt werden bei Format("Summe", "Currency") würde -> Summe in der Txt angezeigt
    40. End Sub


    warum Funktioniert

    Me.txtRechnungsbetrag.text = Format(Summe,"Currency") nicht
    wenn ichs so schreibe = Format("Summe", "Currency") schreibt er Summe :cursing:

    mit summe ist das bereits auf 2 Nachkommastellen gerundete Ergebnis gemeint!!!!

    Wie geht der richtige Text?? ?( ?( ?(

    Danke


    Habs hinbekommen...... :D

    Visual Basic-Quellcode

    1. Summe1 = Format$(Summe, "#,##0.00")
    2. Me.txtRechnungsbetrag.Value = Format(Summe1, "Currency")

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Angel07“ ()