Forum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - Brackets after the sub name
vba courses london - Brackets after the sub name
Resolved · Low Priority · Version Standard
Brackets after the sub name
Hi,Could you let me know what I should use the brackets for after the initial sub command?
ie. Sub ThisMacro()
I remember it is used to define something but also remember that it wasn't used in every case.
Thanks,
Matt
For upcoming training course dates see: Pricing & availability
RE: Brackets after the sub name
Hi MattThe brakets are used to declare variables/arguments.
ie
Function sumNo(x, y)
sumNo = x + y
End Function
So in the above example, you would type in excel
=sumNo(3,5)
and the answer would be 8
Alternatively you could use cell references
=sumNo(A1,A2).
Regards
Richard
|
|
» Forum post: Data cosolidating |



Course updates

