Results 1 to 12 of 12

Thread: ** RESOLVED ** Excel Object Question (Just to add to the pile)

Threaded View

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Question ** RESOLVED ** Excel Object Question (Just to add to the pile)

    OK .... I know there are LOADS of Excel based questions on these forums. I've even answered some of them, but this one is a bit different.

    I've done enuff Excel based in VB now to know where to find errors that create EXCEL objects 'on the fly', and I know if you create an Excel object, you have to pretty much prefix EVERYTHING with it to stay out of trouble, but I've just stumbled across something else maybe someone can answer.

    EVERY time I run a VB app that uses the Excel object, it leaves an EXCEL process when its finished.

    Weirdly though, this only happens on Windows 2000 and Windows XP machines. Run it on 95 or 98 and you don't get a problem

    Is there a new 'EXCEL9.OLB' to cover 2000/XP ?

    If so I couldn't find one.

    The following code is an example, and yes the file does exist :

    VB Code:
    1. Private Sub Build_Cus_Enq_1()
    2.     Dim objExcel As Excel.Application
    3.    
    4.     Set objExcel = CreateObject("Excel.Application")
    5.     With objExcel
    6.         .Workbooks.Open "C:\Excel.csv"
    7.         .Visible = True    
    8.     End With
    9.    
    10.     Set objExcel = Nothing
    11.    
    12. End Sub
    Last edited by TheBionicOrange; Feb 4th, 2003 at 07:27 AM.

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