ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB Code Remains In Memory (https://www.excelbanter.com/excel-programming/318738-vbulletin-code-remains-memory.html)

Paul Moles

VB Code Remains In Memory
 
I have a workbook with several Macros, if the workbook is closed but Excel
left open, (using close window "x" or File Close)The Macro code remains in
the visual basic editor and can even become duplicated/triplicated if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros but neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it possible to
change it so the Visual Basic code closes when the Workbook is closed.

Thanks




Lonnie M.

VB Code Remains In Memory
 
Paul,
At the end of Workbook_BeforeClose, you might try placing the following
code:
Application.Quit

HTH, it probably isn't actually fixing what is wrong, but it should
give you a work around-Lonnie


Ron de Bruin

VB Code Remains In Memory
 
Hi Paul

Maybe you have use "set" in your code and don't set it to nothing when you close your file.

If you dim outside a macro (at the top of a module) you must set it to nothing when you close the file.
If you dim in the macro you don't have to do this.

Set ???? = Nothing

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Paul Moles" wrote in message ...
I have a workbook with several Macros, if the workbook is closed but Excel
left open, (using close window "x" or File Close)The Macro code remains in
the visual basic editor and can even become duplicated/triplicated if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros but neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it possible to
change it so the Visual Basic code closes when the Workbook is closed.

Thanks






Tom Ogilvy

VB Code Remains In Memory
 
Do you have the google toolbar installed? I understand it causes this
problem.

--
Regards,
Tom Ogilvy

"Paul Moles" wrote in message
...
I have a workbook with several Macros, if the workbook is closed but Excel
left open, (using close window "x" or File Close)The Macro code remains in
the visual basic editor and can even become duplicated/triplicated if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros but

neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it possible to
change it so the Visual Basic code closes when the Workbook is closed.

Thanks






Paul Moles

VB Code Remains In Memory
 
Apologies multiple posting, "lying" server reported problem that message
could not be uploaded to excel.worksheet.functions so tried this group
instead.

No "SET" in the project code.

Any further suggestion?

Thanks

Paul

"Ron de Bruin" wrote:

Hi Paul

Maybe you have use "set" in your code and don't set it to nothing when you close your file.

If you dim outside a macro (at the top of a module) you must set it to nothing when you close the file.
If you dim in the macro you don't have to do this.

Set ???? = Nothing

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Paul Moles" wrote in message ...
I have a workbook with several Macros, if the workbook is closed but Excel
left open, (using close window "x" or File Close)The Macro code remains in
the visual basic editor and can even become duplicated/triplicated if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros but neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it possible to
change it so the Visual Basic code closes when the Workbook is closed.

Thanks







Paul Moles

VB Code Remains In Memory
 
I have on this machine will have to check user machines, where google toolbar
will not be present, to see if VB behaves differently.

Thanks

Paul

"Tom Ogilvy" wrote:

Do you have the google toolbar installed? I understand it causes this
problem.

--
Regards,
Tom Ogilvy

"Paul Moles" wrote in message
...
I have a workbook with several Macros, if the workbook is closed but Excel
left open, (using close window "x" or File Close)The Macro code remains in
the visual basic editor and can even become duplicated/triplicated if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros but

neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it possible to
change it so the Visual Basic code closes when the Workbook is closed.

Thanks







Paul Moles

VB Code Remains In Memory
 
Seems to be an Office 2003 phenomenon as removing Google toolbar on this
machine doesn't change VB behaviour,(don't have a virgin 2003 machine to
check for orphaned files) but on Office Xp machines even with Google toolbar,
VB is as expected and closes with Workbook. All machines Win Xp.

Any other suggestions?

"Paul Moles" wrote:

I have on this machine will have to check user machines, where google toolbar
will not be present, to see if VB behaves differently.

Thanks

Paul

"Tom Ogilvy" wrote:

Do you have the google toolbar installed? I understand it causes this
problem.

--
Regards,
Tom Ogilvy

"Paul Moles" wrote in message
...
I have a workbook with several Macros, if the workbook is closed but Excel
left open, (using close window "x" or File Close)The Macro code remains in
the visual basic editor and can even become duplicated/triplicated if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros but

neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it possible to
change it so the Visual Basic code closes when the Workbook is closed.

Thanks







Dave Peterson[_5_]

VB Code Remains In Memory
 
I've seen it xl97 and win98.

I current use xl2002 and win98 at home. I've seen it there, too.

I use xl2k and win2k at work and have seen it there.

I don't use the google desktop search anywhere.

Aside from being an irritant, I've never seen it cause trouble for me. And if
I'm really irritated, I close and reopen excel.



Paul Moles wrote:

Seems to be an Office 2003 phenomenon as removing Google toolbar on this
machine doesn't change VB behaviour,(don't have a virgin 2003 machine to
check for orphaned files) but on Office Xp machines even with Google toolbar,
VB is as expected and closes with Workbook. All machines Win Xp.

Any other suggestions?

"Paul Moles" wrote:

I have on this machine will have to check user machines, where google toolbar
will not be present, to see if VB behaves differently.

Thanks

Paul

"Tom Ogilvy" wrote:

Do you have the google toolbar installed? I understand it causes this
problem.

--
Regards,
Tom Ogilvy

"Paul Moles" wrote in message
...
I have a workbook with several Macros, if the workbook is closed but Excel
left open, (using close window "x" or File Close)The Macro code remains in
the visual basic editor and can even become duplicated/triplicated if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros but
neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it possible to
change it so the Visual Basic code closes when the Workbook is closed.

Thanks







--

Dave Peterson

Tom Ogilvy

VB Code Remains In Memory
 
It occurs on a repetitive basis? Or is it an occasional thing? The OP
seems to describe a consistent problem.

--
Regards,
Tom Ogilvy

"Dave Peterson" wrote in message
...
I've seen it xl97 and win98.

I current use xl2002 and win98 at home. I've seen it there, too.

I use xl2k and win2k at work and have seen it there.

I don't use the google desktop search anywhere.

Aside from being an irritant, I've never seen it cause trouble for me.

And if
I'm really irritated, I close and reopen excel.



Paul Moles wrote:

Seems to be an Office 2003 phenomenon as removing Google toolbar on this
machine doesn't change VB behaviour,(don't have a virgin 2003 machine to
check for orphaned files) but on Office Xp machines even with Google

toolbar,
VB is as expected and closes with Workbook. All machines Win Xp.

Any other suggestions?

"Paul Moles" wrote:

I have on this machine will have to check user machines, where google

toolbar
will not be present, to see if VB behaves differently.

Thanks

Paul

"Tom Ogilvy" wrote:

Do you have the google toolbar installed? I understand it causes

this
problem.

--
Regards,
Tom Ogilvy

"Paul Moles" wrote in message
...
I have a workbook with several Macros, if the workbook is closed

but Excel
left open, (using close window "x" or File Close)The Macro code

remains in
the visual basic editor and can even become duplicated/triplicated

if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros

but
neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it

possible to
change it so the Visual Basic code closes when the Workbook is

closed.

Thanks







--

Dave Peterson




Tom Ogilvy

VB Code Remains In Memory
 
Here is a reference posted by Frank Kabel.

Anything familiar he

http://www.dicks-blog.com/archives/2...oogle-desktop/

--
Regards,
Tom Ogilvy

"Paul Moles" wrote in message
...
Seems to be an Office 2003 phenomenon as removing Google toolbar on this
machine doesn't change VB behaviour,(don't have a virgin 2003 machine to
check for orphaned files) but on Office Xp machines even with Google

toolbar,
VB is as expected and closes with Workbook. All machines Win Xp.

Any other suggestions?

"Paul Moles" wrote:

I have on this machine will have to check user machines, where google

toolbar
will not be present, to see if VB behaves differently.

Thanks

Paul

"Tom Ogilvy" wrote:

Do you have the google toolbar installed? I understand it causes this
problem.

--
Regards,
Tom Ogilvy

"Paul Moles" wrote in message
...
I have a workbook with several Macros, if the workbook is closed but

Excel
left open, (using close window "x" or File Close)The Macro code

remains in
the visual basic editor and can even become duplicated/triplicated

if the
workbook is susequently reopened in the same Excel session.

The workbook includes Auto_Open and Workbook_BeforeClose macros but
neither
have contents that would suggest or require this activity.

Is this normal behaviour? if so what is its purpose and is it

possible to
change it so the Visual Basic code closes when the Workbook is

closed.

Thanks










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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com