Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I posted the following a few days ago, but still have gotten no response. Trying again with more detail.
I'm embedding Excel in a VB app, and I've found that when the user is editing the formula in a cell, that certain automation calls hang - they bring up VB's Switch To/Retry/Cancel dialog. Is there any way to programmatically click the checkmark to get out of formula edit mode so that the document may manipulated? To reproduce, create a form with a button and a webbrowser control. Add the following code. Then launch the app, wait while the spreadsheet is loaded, add some content, and while a formula is being edited (the x and checkmark next to the formula bar are visible), click the button. If the x and checkmark are not visible, then it will work, you can do something like set the button's caption to the activecell's formula if you like, but while the formula is being edited, this causes the hang. It had been suggested that this was due to asynchronous loading, but this is not the case. It is because Excel refuses certain automation calls while the formula is being edited. Private Sub Command1_Click() Dim wb As Excel.Workbook Dim ws As Excel.Worksheet Dim w As Excel.Window Set wb = WebBrowser1.Document Set ws = wb.ActiveSheet Set w = wb.Windows(1) End Sub Private Sub Form_Load() WebBrowser1.Navigate2 "file:///C:/test.xls" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula for spreadsheet, avoiding zeros? | New Users to Excel | |||
Application hang with array sum(sumif... formula | Excel Worksheet Functions | |||
Formula do not work until edited | Excel Discussion (Misc queries) | |||
Avoiding circular reference on formula | Excel Discussion (Misc queries) | |||
hang when formula bar open | Excel Programming |