LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default SLOW CODE!!! . ........ help (maybe due to unsound BINDING)

I doubt whether the below will run on someone elses machine as you may
need to play arounfd with the variables (the "blah blah" bits
definitely won't work!)
Is the below sound code in terms of getting things to run
quickly?....because things don't seem to run very quickly when it
executes. (I have a feeling it has something to do with the public
variable WordApplication?!)

Any help greatly appreciated
Jason Q


Public WordApplication As Object
Sub AppOpen()

Dim strApp As String
strApp = "Word.Application"
'check to see if Word is running
On Error Resume Next
If Not IsRunning(strApp) Then
Set WordApplication = CreateObject(strApp)
Else
Set WordApplication = GetObject(, strApp)
End If
On Error GoTo 0
strApp = ""

myFilePath = "I: blah blah " & strFile & ".Doc"
myFileCopy = "I: blah blah " & strFile & "\" & strFile & " " _
& Now & ".Doc"

FileSystem.FileCopy myFilePath, myFileCopy 'USING A REFERENCE

With WordApplication
.WindowState = 2
.Visible = True
End With

End Sub

 
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
SLOW Code... Ernst Guckel[_4_] Excel Programming 2 March 20th 05 10:58 AM
Late Binding examples of binding excel application HeatherO Excel Programming 13 March 17th 05 08:19 AM
Slow Code Frank Kabel Excel Programming 1 July 23rd 04 09:28 AM
Is this slow code? Tom Excel Programming 4 March 3rd 04 11:18 PM
EARLY binding or LATE binding ? jason Excel Programming 6 February 26th 04 04:57 PM


All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"