Hello,
I have a main sub that is calling a sub to Import some Data and if it fails or returns a false, i want it to exit the Main Sub. I have read deep into forums and have found that the way to do this is by converting the called sub to a function then calling the value e.g.. But I am having difficulties with my Function.Please Login or Register to view this content.
It is currently running the first part up to the 'else' or so where it opens the file but it will no longer copy the sheet to the workbook where the macro was called from it just leaves it open and will only copy the sheet if i leave the workbook open in the background and run it again. Please see the Function below and advise where this is wrong or if there is a way to achieve what I am trying to do with it as a sub.
Please Login or Register to view this content.
Please let me know if i haven't included enough details.
Bookmarks