I don't normally use VB, and even less vba for excel, but I'm writing a function inside a macro and seem to not understand even the basics of creating a function
For example
Public Function test() As Integer
return 1
End Function
This gives a compile error.
This is profoundly stupid, but how do I make a function return an integer in vba?