WordWrap(ByVal strtext As String, ByVal intwidth as Integer) As String would be the definition of a function. To call the function, change the code to strreturnstr = WordWrap(MyString, MyInt).

------------------
Marty