PRB: Inconsistent Results When Calling FreezePanes in OnLoad Event of Window (256625)
The information in this article applies to:
- Microsoft Office Spreadsheet Component 9.0 1.0
- Microsoft Visual Basic, Scripting Edition 5.0
- Microsoft Internet Explorer (Programming) 4.01
- Microsoft Internet Explorer (Programming) 5
- Microsoft Internet Explorer (Programming) 5.01
This article was previously published under Q256625 SYMPTOMS
When you call the FreezePanes method of a Spreadsheet component on a Web page, the frozen pane may not appear on the spreadsheet as expected.
CAUSE
The FreezePanes method is dependent on the window. When a Web page is parsed, and occasionally during the window's onLoad event, the Spreadsheet component may not yet have a window because Internet Explorer sometimes creates the window after onLoad has fired.
RESOLUTION
To work around this problem, you can use the setTimeout method of the window in the onLoad event to call a routine that freezes the panes once onLoad completes. This solution is illustrated in the "More Information" section of this article.
REFERENCES
For more information on the Office Web Components, please visit the following support site:
For additional information on using JScript to handle events, such as the window onLoad event, click the article number below
to view the article in the Microsoft Knowledge Base:
183617 PRB: VBScript Style Event Trapping Does Not Work in JScript
For additional information about sample code that demonstrates solutions using the Office 2000 Web Components with VBScript and ASP, please click the article number below
to view the article in the Microsoft Knowledge Base:
258187 OWebComp.exe Contains Scripting Samples for the Office Web Components
Modification Type: | Minor | Last Reviewed: | 8/23/2005 |
---|
Keywords: | kbOfficeWebSpread kbprb KB256625 |
---|
|