Why is here the Output here 4 and ot 5 ?
Is it one of the many VB Bugs or my code ?
Private Sub Command1_Click()
Dim i As Integer
i = 4
Call inc(i, ,3)
MsgBox i '---> Output 4 , why ?
End Sub
Private Sub inc(c As Integer, Optional b As Integer, _ Optional d As Integer)
If IsMissing(b) Then
c = c + 1
Else
c = c + b
End If
End Sub
Is it one of the many VB Bugs or my code ?
Private Sub Command1_Click()
Dim i As Integer
i = 4
Call inc(i, ,3)
MsgBox i '---> Output 4 , why ?
End Sub
Private Sub inc(c As Integer, Optional b As Integer, _ Optional d As Integer)
If IsMissing(b) Then
c = c + 1
Else
c = c + b
End If
End Sub