Private Sub Command1_Click()
f1
End Sub
Private Sub Command2_Click()
f2
End Sub

Private Sub f1(Optional a As Variant)
MsgBox IsMissing(a)
End Sub

Private Sub f2(Optional a As Integer)
MsgBox IsMissing(a)
End Sub

the function only works with the variant type

is there another way to use this