I think it is 255, but you should not abuse it :)
From the MSDN link for Function :
name
Function name; Complies with standard naming conventions.
And from the MSDN help for Variables :
[...] Variable name:
- You need to start with an alphabetic character.
- Cannot contain an embedded period.
- Must not exceed 255 characters.
- Must be unique in the area in which it is declared.
source share