I am curious to know why the following works even when I have not specified the return type of my function?
I always thought functions must be declared with a name, arguments and return type.![]()
Sub test() Dim mysum As String mysum = sum(4, 7) Debug.Print mysum End Sub Function sum(x As Integer, y As Integer) 'no return type specified t = x + y sum = t End Function
Bookmarks