There are two kinds of strings: variable-length and fixed-length strings.
A variable-length string can contain up to approximately 2 billion (2^31) characters.
A fixed-length string can contain 1 to approximately 64K (2^16) characters.
Function LoadCSV(CSV1or2 As Integer, fileLoc As Variant, dt As Date, shortFileLoc As Variant, tempFileLoc As String, batchCalLoc As String, templateFileLoc As String) As Boolean
Dim wbThis As Workbook
Set wbThis = ThisWorkbook
Dim wsInput As Worksheet
Dim wsOutput As Worksheet
Dim wbInput As Workbook
Dim outputSheetName As String
Dim copyRange As Range
Dim pasteRange As Range
Dim rng As Range
Dim rootDir As String
Dim fso As New FileSystemObject
Dim str As String
If (fso.FileExists(tempFileLoc)) Then _
fso.DeleteFile (tempFileLoc)
str = batchCalLoc & " /nc """ & fileLoc & """ """ & tempFileLoc & """ /template """ & templateFileLoc & """"
Shell (str)
c = 1
maxWaitCount = 60
While (fso.FileExists(tempFileLoc) = False And c < maxWaitCount)
Application.Wait (Now + TimeValue("0:00:03"))
c = c + 1
Wend
If (fso.FileExists(tempFileLoc) = False) Then
GoTo ErrorOut
End If
Sub test()
Dim x As String
Dim y As String
x = "12345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
1234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890"
MsgBox CStr(Len(x))
y = x
MsgBox CStr(Len(y))
End Sub