I have this sample code formula for Cost Budget, but it seems i miss something????
Private Sub TextBox1_Change()
Select Case Me.ComboBox1.Value
Case "Cost Budget"
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
Case "Revenue"
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
Case "Actual Hours"
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
End Select
End Sub
Private Sub TextBox2_Change()
Select Case Me.ComboBox1.Value
Case "Cost Budget"
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
Case "Actual Hours"
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
End Select
End Sub
Private Sub TextBox3_Change()
Select Case Me.ComboBox1.Value
Case "Cost Budget"
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
Case "Actual Hours"
If IsNumeric(TextBox1) And IsNumeric(TextBox2) And IsNumeric(TextBox3) Then
TextBox4 = TextBox1 * TextBox2 / TextBox3
Else
TextBox4 = ""
End If
End Select
End Sub
Bookmarks