Hi Peter
The simple answer is you can't. One reason is ... suppose you call test()
but don't assign its return value to anything. Which version of your test
function should the compiler call?
Try this instead
Public Sub test(ByRef Value As Integer)
Value = 1
End Sub
Public Sub test(ByRef Value As Single)
Value = 1
End Sub
HTH
Charles
"Peter" <pi*******@hotmail.com> wrote in message
news:a6*************************@posting.google.co m...
Hi, how can I do this (I don't really want to do this but what I do
want the same function name but have different return types and the
compiler keeps saying "public function .... they differ only by return
types")?
Public Function test() As Integer
Return 1
End Function
Public Function test() As Single
Return 1
End Function
Thank you
Peter