Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I writing in VBA for excell.
My program calls the filecopy function in a private function. If filecopy fails, the program should analyze it and return with a failure value to the main subrotine that calld the fuction (in a success execution of filecopy, the function returns the workbook object of the new destination file). How can I check the status of the execution? How can I found out if the returnd workbook object has value or it's empty? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I tend to do something like Err.clear 'err is not destroyed when the sub ends On Error Resume Next 'do the copy If err.number<0 then 'an error has occurred so do something Else 'do something else end if On Error Goto 0 You could also capture the error number using Err.Number if you want to do something with it. regards Paul On May 11, 9:23*am, Noa wrote: I writing in VBA for excell. My program calls the filecopy function in a private function. If filecopy fails, the program should analyze it and return with a failure value to the main subrotine that calld the fuction (in a success execution of filecopy, the function returns the workbook object of the new destination file). How can I check the status of the execution? How can I found out if the returnd workbook object has value or it's empty? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Object Library Invalid" Error occurring...why? | Excel Programming | |||
#Name? Error in place of function result | Excel Programming | |||
FileCopy Error 52 | Excel Programming | |||
FileCopy error | Excel Programming |