Hello I am having trouble with the inputbox function in my macro. In the prompt of the inputbox I have a string that was created by adding all of the sheets in a workbook to it and separates with vbNewLine. But when the document is larger and has many sheets I receive the error: Error 2015. Any thoughts below is the code that I am using.

Public Sub UserForm_Initialize1(SheetTitle, selectedFile)
Dim ws As Worksheet
Dim wkb As Workbook
Dim Sht() As Variant
Dim shtlist As String
Dim prompt As String
Dim col As New Collection

Set wkb = Workbooks.Open(selectedFile)

For Each ws In wkb.Worksheets
'ReDim Preserve Sht(1 To UBound(Sht) + 1) As Variant
col.Add ws.Name
Next ws

Sht = toArray(col)

shtlist = Join(Sht, ", ")
prompt = "Select Sheet to run macro on" & vbNewLine & vbNewLine & shtlist
On Error Resume Next
SheetTitle = Application.InputBox(prompt:=prompt)
If SheetTitle = "Error 2015" Then

SheetTitle = Application.InputBox(prompt:="Select sheet to run macro on" & shtlist)
End If



End Sub