Results 1 to 4 of 4

Thread: [Excel 2002] Quit

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    Viet Nam
    Posts
    142

    Re: Vba Button Export Data From Xls To Mdb

    Hey, thanks to you, I finish my own codes. But there is still one more problem.
    vb Code:
    1. Set xlApp = nothing

    This line of code did not work as expected. After run these codes, the process EXCEL was not killed and still using some resources. Have you all seen this? And how can this be done.? Do you think we need to call Kill process method?

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Vba Button Export Data From Xls To Mdb

    I dont know what code you have but perhaps it would be best to start your own thread.

    YOu cant kill the excel process just by setting hte applicaiton object variable to Nothing. You need to .Quit it first and before that any other object variables of Excel.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    Viet Nam
    Posts
    142

    Re: Vba Button Export Data From Xls To Mdb

    vb Code:
    1. Set excelWksht = Nothing
    2.     excelWbk.Close Savechanges:=True
    3.     Set excelWbk = Nothing
    4.     excelApp.Quit
    5.     Set excelApp = Nothing
    I am sorry for being not so clear. My codes were above, it really did not work, and bythe way I am using Office XP.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [Excel 2002] Quit

    But it just not that either. If you are implicitly creating excel objects you will have multiple references created and it will hang. Please post all your code.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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