Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about VBA (easy!!!) 1

Status
Not open for further replies.

neillovell

Programmer
Aug 27, 2002
560
GB
Do functions have return values, a la C, C++, javascript etc. ?

I can do
Function MyFunc() As String
//... code
End Function

and the header implies a return value, but if I do

return MyString
I get an error.
 
You can return values by assigning the value
to the function name - try this:
Code:
MyFunc = MyString
Regards...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top