Hello All,

I am a new user to Visual Basic so I'm afraid this is a fairly primitive question. I am trying to create a function that will give a number whose digits go from 1 to specified value, 11 should give 1234567891011. I made the code below:

Function LONGNUM(x As Integer) As String
Dim i As Integer, text As String, Answer As Long
For i = 1 To x
text = text & CStr(i)
Next i
Answer = CLng(text)
LONGNUM = reversedText
End Function

All integer inputs produce absolutely nothing. What am I doing wrong? Thanks for all the help in advance.