ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   OLE2 problem with the "formula bar" (https://www.excelbanter.com/excel-programming/281201-ole2-problem-formula-bar.html)

JM[_3_]

OLE2 problem with the "formula bar"
 
Hi,

I have a C++/MFC/OLE2 automation application for Excel that works perfectly
.... except when the user call it while he is typing text in the "formula
bar".

Excel then either refuse any OLE command with the error number 800A03EC or
simply die with an "abnormal program terminaison" message.

Does someone know a way to kill the focus of the formula bar without using
OLE?
I tried sending the formula bar window (EXCEL<) the WM_CHAR, VK_ENTER
message. But this doesn't work because instead of loosing the focus, the
formula is appended a "enter" character :(

I have no clues on how to resolve this. I cannot ask my users to allway
click into the sheet before lauching my application.

Thanks in advance
Jonathan Mérel




All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com