Sub btAll_Click
Dim val As String
CopyAll = 1
CopyIdx = 0
smbUrl = "smb://" & smbServer & "/" & smbFreig & "/trans/"
smbf.Initialize("smbf", "", smbUser, smbPassw, smbUrl) ' <<<<<< here the app chrashes
If CopyIdx < lvFile.Size Then
val = lvFile.GetItem(CopyIdx)
CallSubDelayed3(Me, "start_upload", val, CopyIdx)
End If
End Sub