Hello and welcome to the forum
Please take a few moments to read the forum rules (see below, in particular)
Option Explicit
Function LONGNUM(x As Integer) As String
Dim i As Integer, sText As String, Answer As Long
For i = 1 To x
sText = sText & CStr(i)
Next i
LONGNUM = sText
End Function
Sub sTest_LONGNUM()
Debug.Print LONGNUM(11)
Debug.Print LONGNUM(12)
Debug.Print LONGNUM(13)
Debug.Print LONGNUM(14)
End Sub
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
Bookmarks