|
-
Apr 30th, 2003, 01:52 AM
#1
Thread Starter
New Member
Excel Object remains in the memory
Hi All,
I am doing VBA Programming in excel using office 97.I have created excel object as follows
Dim objexcel As Excel.Application
Dim objwb As Excel.Workbook
Dim objsh As Excel.Worksheet
Dim objshMI As Excel.Worksheet
Inspite of closing the workbook and setting all the object to nothing when I press ctrl+Alt+del it always shows one excel object in the memory.
I am closing the wb and setting the object to nothing in following order
objwb.Close savechanges:=False
objexcel.Application.Quit
Set objexcel = Nothing
Set objwb = Nothing
Set objshMI = Nothing
Set objsh = Nothing
Thanks & Regards,
Jignesh
-
Apr 30th, 2003, 12:29 PM
#2
Try changing the order.
Code:
objwb.Close savechanges:=False
objexcel.Application.Quit
Set objshMI = Nothing
Set objsh = Nothing
Set objwb = Nothing
Set objexcel = Nothing
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
May 2nd, 2003, 05:27 AM
#3
Thread Starter
New Member
Thanks for the reply but even after changing the order things are not working as required.
One thing which I found out is that this problem occures only when the data file i.e. excel file is a big say around 2500 rows if I reduce this to 1000 rows everything works fine, there is no excel object in the memory.
So is there any problem in working with large excel file.My system config is windows 98,256 MB RAM
Thanks in advance
Jignesh
Thanks & Regards,
Jignesh
-
May 2nd, 2003, 11:17 AM
#4
Sound like a timing issue. When there are allot of records it is
taking Excel longer to close and the code is destroying the
objects before it should. Try adding a delay or check to allow
Excel time to close.
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
May 4th, 2003, 11:25 PM
#5
Thread Starter
New Member
Hi,
Thanks for the reply.But actually what is happening is that things are working fine on the OS2000.The problem happens only on 95 and 98 machine.So is there any issues while working with larges excel file on 95/98 OS.
If any then please let me know and also if u know the workaround.
Thanks in advance
Jignesh
Thanks & Regards,
Jignesh
-
May 5th, 2003, 12:14 PM
#6
Are the 95/98 machines running the same version of Excel?
If not check and make sure that all methods and properties are available.
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|