PC Review


Reply
Thread Tools Rate Thread

Code doesn't disappear

 
 
Otto Moehrbach
Guest
Posts: n/a
 
      24th Mar 2009
Excel XP & Win XP
I've never seen this before but I can't say it has never happened
before.
I have wb A.xls open and I work in the VBE.
I get finished and CLOSE THE WB but leave Excel running.
I go into the VBE and, behold, there is wb A.xls listed.
I click on wb A.xls and there is the code for that wb. All of it.
Remember that wb A.xls is closed.
Is this normal? Thanks for your time. Otto


 
Reply With Quote
 
 
 
 
Susan
Guest
Posts: n/a
 
      24th Mar 2009
as far as i am aware, the VBE doesn't get cleared until excel gets
completely closed out. therefore, whatever documents you open in a
session of excel remain in the VBE until you close excel.

susan


On Mar 24, 2:30*pm, "Otto Moehrbach" <moehrbachoex...@bellsouth.net>
wrote:
> Excel XP & Win XP
> * * I've never seen this before but I can't say it has never happened
> before.
> I have wb A.xls open and I work in the VBE.
> I get finished and CLOSE THE WB but leave Excel running.
> I go into the VBE and, behold, there is wb A.xls listed.
> I click on wb A.xls and there is the code for that wb. *All of it.
> Remember that wb A.xls is closed.
> Is this normal? *Thanks for your time. *Otto


 
Reply With Quote
 
Susan
Guest
Posts: n/a
 
      24th Mar 2009
well, now, i may be completely wrong on that.
it doesn't work that way on my machine (at the moment) although i know
i have seen lingering documents in the VBE before..........
susan


On Mar 24, 2:40*pm, Susan <bogenex...@aol.com> wrote:
> as far as i am aware, the VBE doesn't get cleared until excel gets
> completely closed out. *therefore, whatever documents you open in a
> session of excel remain in the VBE until you close excel.
>
> susan
>
> On Mar 24, 2:30*pm, "Otto Moehrbach" <moehrbachoex...@bellsouth.net>
> wrote:
>
>
>
> > Excel XP & Win XP
> > * * I've never seen this before but I can't say it has never happened
> > before.
> > I have wb A.xls open and I work in the VBE.
> > I get finished and CLOSE THE WB but leave Excel running.
> > I go into the VBE and, behold, there is wb A.xls listed.
> > I click on wb A.xls and there is the code for that wb. *All of it.
> > Remember that wb A.xls is closed.
> > Is this normal? *Thanks for your time. *Otto- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
Tim Zych
Guest
Posts: n/a
 
      24th Mar 2009
I believe this is normal as A.xls is still in memory.

This is replicable:

1. Create a workbook called A.xls. Add a module with some code.

2. Create a 2nd workbook, add a module and run the following macro:

Public wkb As Workbook
Sub Test()
Set wkb = Workbooks("A.xls")
End Sub

3. Close A.xls

4. Go back to the VBE and A.xls is still there and the code is visible too.

5. Click the Stop button. A.xls is cleared out.

Now perform the steps again with a modified macro, and omit Step 5.

Sub Test()
Set wkb = Workbooks("A.xls")
Set wkb = Nothing
End Sub

A.xls is no longer available.


--
Tim Zych
http://www.higherdata.com
Workbook Compare - Excel data comparison utility
Free and Pro versions

"Otto Moehrbach" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Excel XP & Win XP
> I've never seen this before but I can't say it has never happened
> before.
> I have wb A.xls open and I work in the VBE.
> I get finished and CLOSE THE WB but leave Excel running.
> I go into the VBE and, behold, there is wb A.xls listed.
> I click on wb A.xls and there is the code for that wb. All of it.
> Remember that wb A.xls is closed.
> Is this normal? Thanks for your time. Otto
>



 
Reply With Quote
 
ryguy7272
Guest
Posts: n/a
 
      24th Mar 2009
Excel must be loaded in your system memory. If you hit Ctrl+Alt+Delete and
click 'Task Manager', do you any instances of Excel under the 'Processes' tab?

Maybe just before you exit the A.xls book you need to include something like
this:
http://www.tek-tips.com/viewthread.c...=923847&page=1

In the ThisWorkbook Object put a small snippet of code like this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call 'YourCloseMacroNameHere...see example in link above
End Sub


HTH,
Ryan---

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Taskbar doesn't disappear =?Utf-8?B?YmVuZHVrZXI=?= Windows Vista Performance 4 22nd Mar 2007 03:16 AM
Previous User Doesn't Disappear =?Utf-8?B?S1dNRQ==?= Windows XP General 3 30th Jun 2006 05:12 PM
Insert Options button doesn't disappear =?Utf-8?B?U2VyYXBo?= Microsoft Excel Misc 0 25th Apr 2006 02:09 PM
NotifyIcon Doesn't Disappear When Program Closes Phil Galey Microsoft Dot NET 5 9th Dec 2004 12:04 AM
Form Doesn't Disappear =?Utf-8?B?U3RyYXR1c2Vy?= Microsoft Excel Programming 2 13th Oct 2004 10:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 PM.