Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error handler not handling
Hi:
I created an error handler to create a directory if the path wasn't found, and it has stopped working. I'm not sure why it is not going to the Handler now. DestBk is a workbook SavePath is a string for the file path "C:\Temp" Data is a string used to name the file, assigned dynamically in the code. "Donations" for example. FileExtStr is a String = ".xls" if the version is pre 2007 FileFormatNum is -4143, if the version is pre 2007 On Error GoTo PathError DestBk.SaveAs SavePath & Year(Date) & "\" & MonthName(Month(Date) - 1) _ & " " & Year(Date) & "\" & _ Data & "_" & Format(Now(), "MMM_DD_YYYY") & FileExtStr, _ FileFormatNum PathError: MkDir (SavePath & Year(Date) & _ "\" & MonthName(Month(Date) - 1) & " " & Year(Date)) Resume |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error handler | Excel Discussion (Misc queries) | |||
Form Err.Raise error not trapped by entry procedure error handler | Excel Programming | |||
Error handler help | Excel Programming | |||
Error handling with a handling routine | Excel Programming | |||
Error Handler not handling error... | Excel Programming |