Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
excel saving exception in vc code
I save a excel file using vc code, when the file is aready exsited, a
dialogue box appears with three choices--yes, no or cancel--for me to decide whether to cover the exsited file or not. If I choose yes, it runs well. But when I choose ¡°no¡± or ¡°cancel¡±, an exception happens--a messagebox without any words appeares and the excel file doesn¡¯t exit. Why does this happen? Can anyone help me? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
excel saving exception in vc code
Do you always want to save the file?
Application.displayalerts = false 'your code to save the workbook application.displayalerts = true onlyfang wrote: I save a excel file using vc code, when the file is aready exsited, a dialogue box appears with three choices--yes, no or cancel--for me to decide whether to cover the exsited file or not. If I choose yes, it runs well. But when I choose ¡°no¡± or ¡°cancel¡±, an exception happens--a messagebox without any words appeares and the excel file doesn¡¯t exit. Why does this happen? Can anyone help me? -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
excel saving exception in vc code
ps. I don't speak the VC code. You'll have to interpret it.
Dave Peterson wrote: Do you always want to save the file? Application.displayalerts = false 'your code to save the workbook application.displayalerts = true onlyfang wrote: I save a excel file using vc code, when the file is aready exsited, a dialogue box appears with three choices--yes, no or cancel--for me to decide whether to cover the exsited file or not. If I choose yes, it runs well. But when I choose ¡°no¡± or ¡°cancel¡±, an exception happens--a messagebox without any words appeares and the excel file doesn¡¯t exit. Why does this happen? Can anyone help me? -- Dave Peterson -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
excel saving exception in vc code
Oh, thank you very much, Dave! The problem has been solved!
Yes, i always want to save the file, and the counterpart code in vc is "Application.SetDisplayAlerts(false)". Thank you! "Dave Peterson" ... ps. I don't speak the VC code. You'll have to interpret it. Dave Peterson wrote: Do you always want to save the file? Application.displayalerts = false 'your code to save the workbook application.displayalerts = true onlyfang wrote: I save a excel file using vc code, when the file is aready exsited, a dialogue box appears with three choices--yes, no or cancel--for me to decide whether to cover the exsited file or not. If I choose yes, it runs well. But when I choose ¡°no¡± or ¡°cancel¡±, an exception happens--a messagebox without any words appeares and the excel file doesn¡¯t exit. Why does this happen? Can anyone help me? -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to code on Macro on saving and closing a file? | Excel Worksheet Functions | |||
Saving a CSV file from Excel with 0 in front of Zip code | Excel Discussion (Misc queries) | |||
I don't want to run visual basic editer code after saving... | Excel Discussion (Misc queries) | |||
Saving Vba Code | Excel Discussion (Misc queries) | |||
How do I retain leading zero zip code formatting when saving as a. | Excel Discussion (Misc queries) |