View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Paul Moles Paul Moles is offline
external usenet poster
 
Posts: 34
Default 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