Autre possibilité se rapprochant plus de ton code :
Dim c As Integer, b As Integer, x As Integer
Dim p1 As Integer, p2 As Integer, p3 As Integer, p4 As Integer, p5 As Integer
Dim nl As String
Randomize Timer
nl = Chr(10) & Chr(13)
c = 100
b = Int(Rnd() * 100) + 1
x = c - b
p1 = Int(x / 50)
If p1 > 0 Then x = x - p1 * 50
p2 = Int(x / 25)
If p2 > 0 Then x = x - p2 * 25
p3 = Int(x / 10)
If p3 > 0 Then x = x - p3 * 10
p4 = Int(x / 5)
If p4 > 0 Then x = x - p4 * 5
p5 = x
MsgBox b & "---> " & nl & _
p1 & " x 50 cents " & nl & _
p2 & " x 25 cents " & nl & _
p3 & " x 10 cents " & nl & _
p4 & " x 5 cents " & nl & _
p5 & " x 1 cent " & nl & _
p1 + p2 + p3 + p4 + p5 & " pièces."
Je te conseille vivement de modifier ton interface utilisateur en obligeant une déclaration préalable des variables.