Halim,
Whilst it is normal to follow that convention, the brackets have a meaning
themseleves as to how the arguments are passed. Check the debug output of
these examples below to see the trend:
Private Sub CommandButton1_Click()
Dim Arg1Value As Double
Dim Arg2Value As String
Arg1Value = Sin(22 / 7)
Arg2Value = "some string"
MySub1 Arg1Value, Arg2Value
Debug.Print Arg1Value, Arg2Value
Arg1Value = Sin(22 / 7)
Arg2Value = "some string"
MySub1 (Arg1Value)
Debug.Print Arg1Value, Arg2Value
Arg1Value = Sin(22 / 7)
Arg2Value = "some string"
Call MySub1(Arg1Value)
Debug.Print Arg1Value, Arg2Value
Arg1Value = Sin(22 / 7)
Arg2Value = "some string"
MySub1 (Arg1Value), (Arg2Value)
Debug.Print Arg1Value, Arg2Value
Arg1Value = Sin(22 / 7)
Arg2Value = "some string"
Call MySub1((Arg1Value), (Arg2Value))
Debug.Print Arg1Value, Arg2Value
Arg1Value = Sin(22 / 7)
Arg2Value = "some string"
Call MySub1(Arg1Value, Arg2Value)
Debug.Print Arg1Value, Arg2Value
End Sub
Sub MySub1(ByRef arg1 As Double, Optional ByRef arg2 As String)
arg1 = 10
arg2 = "New string"
End Sub
NickHK