Results 1 to 2 of 2

Thread: Excel freezes - Help (Urgent)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69

    Angry

    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
    Live long and prosper...

  2. #2
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    Try adding "xlproj.Quit" before setting the variable to nothing.
    Damonous

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width