silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi guys,
I got a little issue I would need some help from you.
I got a class Module where I import Excel Files and then modify this file to suit.
All works quite well.
The issue is that I like to import the file and then run the next sub afterwards from that sub.
The Code above is my attempt to have an error handler when no file has been chosen.
It works if I do not select a file but it fails to run "ModifyFile" wenn I do select a file.
How would I need to change this error handler to suit so it exit the sub if no file has been selected and run "ModifyFile" once a file has been selected.
Hope this is clear?
Many thanks
Albert
I got a little issue I would need some help from you.
I got a class Module where I import Excel Files and then modify this file to suit.
All works quite well.
The issue is that I like to import the file and then run the next sub afterwards from that sub.
Code:
Sub AuszuegeImportieren()
Set clsA = New clsAuszuege
On Error GoTo Fehler:
With clsA
.ExcelImport
End With
Fehler:
MsgBox "No file has been selected!", vbInformation, p_cstrAppTitel
Exit Sub
ModifyFile
Set clsA = Nothing
End Sub
The Code above is my attempt to have an error handler when no file has been chosen.
It works if I do not select a file but it fails to run "ModifyFile" wenn I do select a file.
How would I need to change this error handler to suit so it exit the sub if no file has been selected and run "ModifyFile" once a file has been selected.
Hope this is clear?
Many thanks
Albert
Last edited: