Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HRESULT: 0x800A03EC shyamprabhu Excel Programming 0 February 27th 07 12:36 PM
Exception from HRESULT: 0x800A03EC While opening Workbook Shreyash Excel Programming 0 February 7th 07 09:36 AM
HRESULT: 0x800A03EC exception when trying to hide a sheet. VVVVVK Excel Programming 1 August 25th 06 11:59 AM
Exception from HRESULT: 0x800A03EC nano2k New Users to Excel 0 July 21st 06 12:15 PM
Chart.Export throws COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. Steven Excel Programming 1 November 5th 03 06:59 PM


All times are GMT +1. The time now is 05:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"