I'm not sure what you mean by 'grid function'. If you are trying to add a gridscreen, look at the gridscreen sample app, and copy the routines you need into your current app.
As far as 'calling a function' goes, it is called the same way you would call any other function -
returnvalue=grid(variables)
Function Grid(Variableone) As Integer
'Do stuff
Return 0
End Function
As long as the function name isn't used somewhere else in your script files, and it isn't a reserved keyword, it will be called as a function as you intend. The return value is optional, but recommended for debugging and documenting program flow.