Here's my code, and I'm curious if anyone can see find out what's wrong with it. This describes a program that can calculate probability... And if anyone wants the files I'll be happy to email them to you. Thanks! (btw, i've explained the problems at the bottom of the page)

'The formula is P(success) = (n! / (k! * l! * (n - k - l)!)) * (p ^ k) * (q ^ l) * (r ^ (n - k - l))
'where:
'n # of dice rolled
'k # of desired successes
'l # of botches
'p is P(success)
'q is P(botch)
'r is P(failure)
' due to constriants of human capability, I will rename the the invididual variables to reflect what they symbologically represent.

Dim pofsuccess As Double
Dim nfactorial, kfactorial, lfactorial, mfactorial As Integer
Dim p, q, r As Single
Dim dicerolled, successes, botches, failures As Variant

Public Function nn(num As Double) As Long
'this function calculates the factorial number for the total number of dice
Dim count As Integer
'counter for calculation
Dim fact_found As Long
'factorial calculated (NB Long data type, +/- 2,147,483,648)

'first number in factorial sequence is 1
fact_found = 1
'count up from 2 to number, multiplying fact_found by each integer value
For count = 2 To num
fact_found = fact_found * count
Next count
'fact_found is value to be returned by function
nn = fact_found
End Function

Public Function ll(num As Double) As Long
'this function calculates the factorial number for botching
Dim count As Integer
'counter for calculation
Dim fact_found As Long
'factorial calculated (NB Long data type, +/- 2,147,483,648)

'first number in factorial sequence is 1
fact_found = 1

'count up from 2 to number, multiplying fact_found by each integer value
For count = 2 To num
fact_found = fact_found * count
Next count
'fact_found is value to be returned by function
ll = fact_found
End Function

Public Function kk(num As Double) As Long
'this function calculates the factorial number for success
Dim count As Integer
'counter for calculation
Dim fact_found As Long
'factorial calculated (NB Long data type, +/- 2,147,483,648)

'first number in factorial sequence is 1
fact_found = 1

'count up from 2 to number, multiplying fact_found by each integer value
For count = 2 To num
fact_found = fact_found * count
Next count
'fact_found is value to be returned by function
kk = fact_found
End Function

Private Function mm(num As Integer) As Long
'this function calculates the factorial number for failure
Dim count As Integer
'counter for calculation
Dim fact_found As Long
'factorial calculated (NB Long data type, +/- 2,147,483,648)

'first number in factorial sequence is 1
fact_found = 1

'count up from 2 to number, multiplying fact_found by each integer value
For count = 2 To num
fact_found = fact_found * count
Next count
'fact_found is value to be returned by function
mm = fact_found
End Function

Private Sub Command1_Click()
dicerolled = (Val(n.Text))
successes = (Val(k.Text))
botches = (Val(l.Text))

'the botches variable will have to be redifined as a value from 0 to (dicerolled - successes)
'this will require removing the l.text from the field testing form.
'such a procedure will have to wait until the basic idea of the calculation can be used

p = Val(psuccess.Text)
q = Val(pbotch.Text)
r = (1 - p - q)
'p,q, and r have not been changed into words for the sake keeping the formula from getting absurdly long.
failures = (dicerolled - successes - botches)

nfactorial = nn(n)
kfactorial = kk(k)
lfactorial = ll(l)
mfactorial = mm(dicerolled - successes - botches)
' "n" "k" and "l" are used instead of their lengened named counterparts to avoid a byref type mismatch error.
pofsuccess = (nfactorial / (kfactorial * lfactorial * mfactorial)) * (p ^ successes) * (q ^ botches) * (r ^ (dicerolled - successes - botches))
Label2.Caption = pofsuccess

'The formula is P(success) = (n! / (k! * l! * (n - k - l)!)) * (p ^ k) * (q ^ l) * (r ^ (n - k - l))
'where:
'n # of dice rolled
'k # of desired successes
'l # of botches
'p is P(success)
'q is P(botch)
'r is P(failure)
'From this definition, it is easy to see how I've manipulated variable names.

End Sub

(The problem I have is that if successes and botches are = to 0 or 1, my program crashes.)