|
-
Mar 23rd, 2004, 03:42 PM
#1
Thread Starter
Addicted Member
Timer Event Question
How would I use a timer in this situation? Or would I use DoEvents?
I recieve an error when I open an HTM file and try to copy/paste it to an Excel file. The HTM file is very large and it takes a few seconds to open, copy and paste. If I run the code line-by-line it works fine.
'Copy Fault Detail from cgi file to template file
Me.StatusBar1.SimpleText = "Copying Fault Detail from POSMON Report to template file....."
Set IE = CreateObject("internetExplorer.application")
IE.Navigate URL:="G:\0000 JAK R & M\Performance Data\Report Generating" & "\" & rs("PlantName").Value & "\" & "Equipment Fault Detail Report.htm"
IE.ExecWB OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT
IE.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT
xlApp.Workbooks(rs("TemplateFile").Value).Worksheets("FaultDetail").Paste
Clipboard.Clear
IE.Quit
If Me.cmbPlantSelection.Text = "Windsor Cylinder Head Assembly" Then
xlApp.Run "DataSorting.XLS!HTMLDataSorting.HTML_FaultDetail_Windsor"
Else
xlApp.Run "DataSorting.XLS!HTMLDataSorting.HTML_FaultDetail"
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|