Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAsCopy generates error HRESULT:0x800A03EC
I attach to Excel Application event WorkbookActivate a method in witch I call
SaveAsCopy. I have search the internet and I found that this error ocurrs because a cell is in edit mode. So my question is how can I end edit of the cell so this error will not ocurr again. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAsCopy generates error HRESULT:0x800A03EC
don't know if it works.
try to push a Esc key programmatically, code as below: Application.OnKey "{ESC}" let me know if it is working or not. regards Leung "ARHangel" wrote: I attach to Excel Application event WorkbookActivate a method in witch I call SaveAsCopy. I have search the internet and I found that this error ocurrs because a cell is in edit mode. So my question is how can I end edit of the cell so this error will not ocurr again. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAsCopy generates error HRESULT:0x800A03EC
Forcing the user out of edit mode, so your code can run, is IMHO a very bad
idea. If I have spent the last 10 minutes typing in a complex formula, only to have it all wiped out, you addin would not be on my system long. Your code should check if in Edit Mode and if so, not run. MS has suggested Application.Ready, but most say this does not function as supposed. An alternative is to check if the FileOpen menu option is enabled or not. NickHK "ARHangel" wrote in message ... I attach to Excel Application event WorkbookActivate a method in witch I call SaveAsCopy. I have search the internet and I found that this error ocurrs because a cell is in edit mode. So my question is how can I end edit of the cell so this error will not ocurr again. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAsCopy generates error HRESULT:0x800A03EC
Perhaps I forgot to tell that my excel is an embeded object so the FileOpen
is out of the question since it does not exist. And the other one that not to run the code if the user is editing is also out of the question. The reason I am doing SaveAsCopy is to create a backup for my file, because autorecovery does not work for embeded objects. Apperently this exception apperas only if I edit the excel embeded, and not if I edit it in MS Excel the exception is not raised. "NickHK" wrote: Forcing the user out of edit mode, so your code can run, is IMHO a very bad idea. If I have spent the last 10 minutes typing in a complex formula, only to have it all wiped out, you addin would not be on my system long. Your code should check if in Edit Mode and if so, not run. MS has suggested Application.Ready, but most say this does not function as supposed. An alternative is to check if the FileOpen menu option is enabled or not. NickHK "ARHangel" wrote in message ... I attach to Excel Application event WorkbookActivate a method in witch I call SaveAsCopy. I have search the internet and I found that this error ocurrs because a cell is in edit mode. So my question is how can I end edit of the cell so this error will not ocurr again. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAsCopy generates error HRESULT:0x800A03EC
So your code is VBA in the embedded workbook ?
Or the code is in an Excel addin ? Either way, when I activate the Excel WB (embedded in a Word doc), I get the Excel menus showing. Maybe check the status of the ViewFormula bar menu item ? Otherwise explain you set up a bit more. NickHK "ARHangel" wrote in message ... Perhaps I forgot to tell that my excel is an embeded object so the FileOpen is out of the question since it does not exist. And the other one that not to run the code if the user is editing is also out of the question. The reason I am doing SaveAsCopy is to create a backup for my file, because autorecovery does not work for embeded objects. Apperently this exception apperas only if I edit the excel embeded, and not if I edit it in MS Excel the exception is not raised. "NickHK" wrote: Forcing the user out of edit mode, so your code can run, is IMHO a very bad idea. If I have spent the last 10 minutes typing in a complex formula, only to have it all wiped out, you addin would not be on my system long. Your code should check if in Edit Mode and if so, not run. MS has suggested Application.Ready, but most say this does not function as supposed. An alternative is to check if the FileOpen menu option is enabled or not. NickHK "ARHangel" wrote in message ... I attach to Excel Application event WorkbookActivate a method in witch I call SaveAsCopy. I have search the internet and I found that this error ocurrs because a cell is in edit mode. So my question is how can I end edit of the cell so this error will not ocurr again. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAsCopy generates error HRESULT:0x800A03EC
My code is an excel add-in. And yes the menus of the excel embeded in a word
appear but the menu File belongs to the word and not to the excel. And like a said I want to replace the autorecovery. And since the autorecovery is triggered even if the user is editing the excel, i thought that there is a way of suspending the editing of the file while I save a copy. Thank you for answering me but apperently in an embeded object since the menu File is not available also the methods of the menu are not woking right. So the container of the excel will have to create my backup file. "NickHK" wrote: So your code is VBA in the embedded workbook ? Or the code is in an Excel addin ? Either way, when I activate the Excel WB (embedded in a Word doc), I get the Excel menus showing. Maybe check the status of the ViewFormula bar menu item ? Otherwise explain you set up a bit more. NickHK "ARHangel" wrote in message ... Perhaps I forgot to tell that my excel is an embeded object so the FileOpen is out of the question since it does not exist. And the other one that not to run the code if the user is editing is also out of the question. The reason I am doing SaveAsCopy is to create a backup for my file, because autorecovery does not work for embeded objects. Apperently this exception apperas only if I edit the excel embeded, and not if I edit it in MS Excel the exception is not raised. "NickHK" wrote: Forcing the user out of edit mode, so your code can run, is IMHO a very bad idea. If I have spent the last 10 minutes typing in a complex formula, only to have it all wiped out, you addin would not be on my system long. Your code should check if in Edit Mode and if so, not run. MS has suggested Application.Ready, but most say this does not function as supposed. An alternative is to check if the FileOpen menu option is enabled or not. NickHK "ARHangel" wrote in message ... I attach to Excel Application event WorkbookActivate a method in witch I call SaveAsCopy. I have search the internet and I found that this error ocurrs because a cell is in edit mode. So my question is how can I end edit of the cell so this error will not ocurr again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HRESULT: 0x800A03EC | Excel Programming | |||
Exception from HRESULT: 0x800A03EC While opening Workbook | Excel Programming | |||
HRESULT: 0x800A03EC exception when trying to hide a sheet. | Excel Programming | |||
Exception from HRESULT: 0x800A03EC | New Users to Excel | |||
Chart.Export throws COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. | Excel Programming |