Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to get rid of a VBAProject?

Excell2002
WB(a) opens WB(1),WB(2),...,WB(n) successively, makes sg
with them then colses them peacefully.
Each of the WB(i) contains VBAProject too.
After closing WB(i), its VBAProject remains still
existing, that causes the application stall.
How coud I get rid of the VBAProject belonging to a closed
WB?
SOS!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to get rid of a VBAProject?

Maybe this is your problem

If you Dim outside your macro like this at the
top of your module

Dim WB As Workbook

Sub test()
Set WB = Workbooks.Open("c:\data\ron.xls")
'your code
WB.Close False
End Sub

You still can see the VBAProject in the VBE

Use this then

Sub test()
Set WB = Workbooks.Open("c:\data\ron.xls")
'your code
WB.Close False
Set WB = Nothing
End Sub

Or Dim in the macro



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"GF" wrote in message ...
Excell2002
WB(a) opens WB(1),WB(2),...,WB(n) successively, makes sg
with them then colses them peacefully.
Each of the WB(i) contains VBAProject too.
After closing WB(i), its VBAProject remains still
existing, that causes the application stall.
How coud I get rid of the VBAProject belonging to a closed
WB?
SOS!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How with VBA, can I activate one of many modules in a VBAProject? [email protected] Excel Discussion (Misc queries) 1 January 17th 07 02:08 AM
VBAProject Andy Excel Worksheet Functions 1 January 10th 05 02:53 PM
VBAProject Protect Kevin Excel Programming 3 November 17th 03 06:50 PM
code in VBAProject will not run Mike[_58_] Excel Programming 2 November 9th 03 04:08 PM
How to Delete a VBAProject JStone0218 Excel Programming 1 November 8th 03 02:47 PM


All times are GMT +1. The time now is 10:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"