Hey all,
I would like to return a string from a function in vb. Although this is
incredibly simple in c/c++, I can't find the syntax for it in vb.
Can anyone help me out? Thanks!
Jonathan West - 17 Dec 2004 16:50 GMT
Hi Clarke
Something like this
Function Foo(inputstring as string) As String
'your code goes here
Foo = "value to be returned"
End Function

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
> Hey all,
> I would like to return a string from a function in vb. Although this is
> incredibly simple in c/c++, I can't find the syntax for it in vb.
>
> Can anyone help me out? Thanks!
Clarke - 17 Dec 2004 18:27 GMT
Thanks Jon!
> Hi Clarke
>
[quoted text clipped - 10 lines]
> >
> > Can anyone help me out? Thanks!
Andi Mayer - 17 Dec 2004 16:53 GMT
>Hey all,
> I would like to return a string from a function in vb. Although this is
>incredibly simple in c/c++, I can't find the syntax for it in vb.
>
>Can anyone help me out? Thanks!
function test(input1 as long, input2 as string) as string
'do your calculation here like:
test=left(input2,input1)
end function
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW