mikechambers
Active Member
- Joined
- Apr 27, 2006
- Messages
- 397
Trying to use the code below. If I select two files for example, and one of them is longer than 255 characters (including path), Excel will crash. It ignores my error handler and just crashes. I cannot figure out a way to get past this. Any ideas?
Sub Macro1()
Dim vSelectFiles As Variant
On Error GoTo EndLabel
vSelectFiles = Application.GetOpenFilename(MultiSelect:=True)
Exit Sub
EndLabel:
MsgBox "Check file name lengths"
End Sub
Sub Macro1()
Dim vSelectFiles As Variant
On Error GoTo EndLabel
vSelectFiles = Application.GetOpenFilename(MultiSelect:=True)
Exit Sub
EndLabel:
MsgBox "Check file name lengths"
End Sub