I'm trying to do a form that returns the size of a circuit breaker when the kVA and voltage are entered, with a calculation behind the form working out the current.
Current = (kVA * 1000) / (Volts * 1.732)
However, I cannot find out how to do this, except by calling consecutive subs.
So, for instance, Current could be 17 Amps, 26 Amps, 45 Amps, anywhere up to 6300 Amps.
Circuit breakers are sized 10, 16, 20, 25, 32, 40, 50, 63, 100, 125, 160, 250, 400, 630...6300, so there are a lot of variables.
The only way i can get this to work is:
This would then need to go through 23 more subs if the current is large.
I've tried IIFs, but that's a no go. Any ideas?
Current = (kVA * 1000) / (Volts * 1.732)
However, I cannot find out how to do this, except by calling consecutive subs.
So, for instance, Current could be 17 Amps, 26 Amps, 45 Amps, anywhere up to 6300 Amps.
Circuit breakers are sized 10, 16, 20, 25, 32, 40, 50, 63, 100, 125, 160, 250, 400, 630...6300, so there are a lot of variables.
The only way i can get this to work is:
Code:
Call CBSize10
Private Sub CBSize10()
If [Current] <= 10 Then
Text39.Value = "10"
Else
Call CBSize16
End If
End Sub
I've tried IIFs, but that's a no go. Any ideas?
Comment