Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Runtime error 1004
I have an interface that opens certain files based on criteria supplied by
the user. If the user starts the process then cancels out because they've changed their mind of opening a file, they get a Runtime error 1004. I'd like to suppress the runtime message and replace it with something along the lines of If Fname = Empty then Msgbox ("You've chosen to not open a file at this time") or something. I just don't want it to look like the link isn't working correctly when the user opts out. How can I suppress this error message specifically? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Runtime error 1004
dim FName as variant
FName = application.getopenfilename if fname = false then msgbox "try later" exit sub end if StephanieH wrote: I have an interface that opens certain files based on criteria supplied by the user. If the user starts the process then cancels out because they've changed their mind of opening a file, they get a Runtime error 1004. I'd like to suppress the runtime message and replace it with something along the lines of If Fname = Empty then Msgbox ("You've chosen to not open a file at this time") or something. I just don't want it to look like the link isn't working correctly when the user opts out. How can I suppress this error message specifically? -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Runtime error 1004
Perfect. Thanks Dave.
"Dave Peterson" wrote: dim FName as variant FName = application.getopenfilename if fname = false then msgbox "try later" exit sub end if StephanieH wrote: I have an interface that opens certain files based on criteria supplied by the user. If the user starts the process then cancels out because they've changed their mind of opening a file, they get a Runtime error 1004. I'd like to suppress the runtime message and replace it with something along the lines of If Fname = Empty then Msgbox ("You've chosen to not open a file at this time") or something. I just don't want it to look like the link isn't working correctly when the user opts out. How can I suppress this error message specifically? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Runtime Error 1004 | Excel Discussion (Misc queries) | |||
runtime error 1004 | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Runtime Error '1004' | Excel Programming | |||
Runtime error '1004': | Excel Programming |