|
-
Sep 26th, 2000, 09:40 AM
#1
Thread Starter
Lively Member
Hi guys got a real problem that has stopped me in my track.
Basically I am calling a Excel spreadsheet from VB and running a VBA routine within the excel program. It seems to go through the routine (Because I stuck a message box at the end of it, whcih flashes up correctly). without incident. But then the excel program freezes!!! I have to right click and close. Can anybody offer any idea how I can stop this. If I run the spreadsheet + macro independent of VB it runs fully without locking. Here is the VB code:
Dim xlproj As Excel.Application
Dim strPath As String
strPath = "c:\data\xlfiles\SOtabs.xls"
Set xlproj = Excel.Application
xlproj.Workbooks.Open "c:\data\xlfiles\Hospital Control Charts\overdispersed.xls"
xlproj.Visible = True
xlproj.Application.Run "getdata", strPath
Control Charts\overdispersed.xls"")
Set xlproj = Nothing
Thank you
Gerard
-
Sep 26th, 2000, 11:56 AM
#2
Lively Member
Try adding "xlproj.Quit" before setting the variable to nothing.
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
|