Hello there,
I am trying to make a calculation form.
in there I have 7 text boxes in which the user can type down a number which then gets calculated.
this now looks like this:
Dim a As Double
Dim b As Double
Dim c As Double
Dim d As Double
Dim e As Double
Dim f As Double
Dim g As Double
Dim h As Double
Dim resoult As Double
a = Me.txtmasse1
b = Me.txtmasse2
c = Me.txtmasse3
d = Me.txtmasse4
e = Me.txtmasse5
f = Me.txtmasse6
g = Me.txtschnitt
h = Me.txtSekunden
resoult = (((a + b + c + d + f + e) / f) * 600) / h
Me.txtMFRAuswertung = resoult
Now this works when all fields contain a value, but what if one or more fields were left empty, how do I make it so the calculation would still go on, by skipping the empty fields from b-e?
I-m new to VBA so don't have much experience yet...
many thanks in advance!
I am trying to make a calculation form.
in there I have 7 text boxes in which the user can type down a number which then gets calculated.
this now looks like this:
Dim a As Double
Dim b As Double
Dim c As Double
Dim d As Double
Dim e As Double
Dim f As Double
Dim g As Double
Dim h As Double
Dim resoult As Double
a = Me.txtmasse1
b = Me.txtmasse2
c = Me.txtmasse3
d = Me.txtmasse4
e = Me.txtmasse5
f = Me.txtmasse6
g = Me.txtschnitt
h = Me.txtSekunden
resoult = (((a + b + c + d + f + e) / f) * 600) / h
Me.txtMFRAuswertung = resoult
Now this works when all fields contain a value, but what if one or more fields were left empty, how do I make it so the calculation would still go on, by skipping the empty fields from b-e?
I-m new to VBA so don't have much experience yet...
many thanks in advance!