Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default hang when formula bar open

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:

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default hang when formula bar open

Hi

You may try to take a look at the link below.

Considerations When Using the WebBrowser Control
The WebBrowser control navigates to documents asynchronously. This means
that when you call WebBrowser1.Navigate, the call returns control to your
Visual Basic application before the document has been completely loaded. If
you plan on Automating the contained document, you need to use the
NavigateComplete2 event to know when the document has finished loading. Use
the Document property of the WebBrowser object passed in to get a reference
to the Office document object, which, in the preceding code, is set to
oDocument.

How To Use the WebBrowser Control to Open an Office Document
http://support.microsoft.com/default...B;EN-US;243058

Also you may try to move the code that open the office document into the
command1_click, because in the form_load the vb6 is initializing the form's
status, which may cause problem, or you may try to call DoEvents in the
end of the form_load.

You may have a try and let me know the result.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

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
Long time to launch/open/hang Excel 2003 Looking for help in NJ Excel Discussion (Misc queries) 0 January 13th 07 02:43 PM
Why does Excel hang up when trying to open files? Cromco Charts and Charting in Excel 0 July 14th 06 04:46 PM
excel 2003 always hang when open more than 1 file Ricky Lai Excel Discussion (Misc queries) 0 January 6th 06 07:31 AM
Why does Excel hang after clicking on file-open-dropdown box Neil48 Excel Discussion (Misc queries) 5 December 3rd 05 08:18 PM
Application hang when open a schema file in Excel Iv Excel Discussion (Misc queries) 0 February 16th 05 03:05 AM


All times are GMT +1. The time now is 08:48 AM.

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"