Hi,
folgende Prozedur hat mit das Wochenende verhagelt:
Public M1 As Currency 'Ganzzahl Monate
Public Z1 As Currency 'Betrag Währung
Public B1 As Currency ’ Bezahlter Gesamtbetrag Währung
Private Sub cboVorauszahlungenBetrag1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
cboVorauszahlungenBetrag1 = Format(cboVorauszahlungenBetrag1, „###,##0.00“)
Z1 = Format(cboVorauszahlungenBetrag1, „###,##0.00“)
M1 = Format(M1, „###,##0.00“)
B1 = Format(M1 * Z1, „###,##0.00“)
MsgBox B1, , „B1“
End Sub
Soll: Msgbox B1 z.B 354,00
Ist: 354
Was mache ich falsch?
Gruß
Wilhelm
Public M1 As Currency 'Ganzzahl Monate
Public Z1 As Currency 'Betrag Währung
Public B1 As Currency ’ Bezahlter Gesamtbetrag Währung
Private Sub cboVorauszahlungenBetrag1_Exit(ByVal Cancel As
End Sub
Hallo Wilhelm,
was soll cboVorauszahlungenBetrag1 sein, eine ComboBox? Die hat bei mir, XL2000, kein Exit-Ereignis.
Deklariere mal die Variablen as Double.
Gruß
Reinhard
Hallo Reinhard,
cboVorauszahlungen1 ist, wie Du richtig vermutest, ein Combobox. Sie hat unter Word 2003, Window Vista home premium SP1 - läuft bei mir - ein Exit-Ereignis.
Mit der Deklarierung der Variablen als double hatte ich es bereits vor meinem Hilferuf versucht: Geht auch nicht.
Was fällt Dir noch ein?
Gruß
Wilhelm
Was fällt Dir noch ein?
Hallo Wilhelm,
äh, eher nix 
So läuft das bei mir, Exit oder Doppelklick müßte ja gleich sein in Bezug auf den Codeablauf:
Option Explicit
’
Public M1 As Double 'Ganzzahl Monate
Public Z1 As Double 'Betrag Währung
Public B1 As Double ’ Bezahlter Gesamtbetrag Währung
’
Private Sub ComboBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
M1 = 50.115
ComboBox1 = Format(ComboBox1, „###,##0.00“)
Z1 = Format(ComboBox1, „###,##0.00“)
M1 = Format(M1, „###,##0.00“)
B1 = Format(M1 * Z1, „###,##0.00“)
MsgBox B1, , „B1“
End Sub
Gruß
Reinhard