Gruppe
Dialog
Problem
Wie kann ich Werte aus mehreren TextBoxes mit einem in einer weiteren TextBox stehenden Faktor multiplizieren und das Ergebnis in einer TextBox anzeigen lassen?
ClassModule: Tabelle1
Private Sub cmdDialogAufruf_Click()
frmBerechnen.Show
End Sub
ClassModule: frmBerechnen
Private Sub cmdBerechnen_Click()
Dim cnt As Control
Dim dValue As Double
For Each cnt In Controls
If Left(cnt.Name, 1) = "S" Then
dValue = dValue + CDbl(cnt.Text)
End If
Next cnt
Controls("Total").Text = dValue * Controls("Faktor").Value
End Sub
Private Sub cmdWeiter_Click()
Unload Me
End Sub
StandardModule: basMain
Sub CallForm()
frmBerechnen.Show
End Sub