0
Sub Check1(x As Integer)
Debug.Print x
End Sub

Sub Play1()
Check1(4)
End Sub
'output = 4

However,

Sub Check2(x As Integer, y as integer)
Debug.Print x & y
End Sub

Sub Play2()
Check2(4,3)
End Sub
'error = Compile Error: Expected =

How can I utilise multiple parameters and call them from different subroutines?

Bhavesh Shaha
  • 717
  • 5
  • 21
  • 1
    `Call Check2(4, 3)` – braX Aug 12 '21 at 03:17
  • 1
    Another option is just remove the parenthesis, since it's a `Sub` and not a `Function` - `Check2 4, 3` - This is the preferred method. – braX Aug 12 '21 at 04:18
  • 1
    https://learn.microsoft.com/en-us/office/vba/language/concepts/getting-started/calling-sub-and-function-procedures – braX Aug 12 '21 at 04:20

0 Answers0