Thread: Closing methods
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Closing methods

Hi
I don't think event code fires when you open or close using CODE, but
then your code executing after the select is odd?
regards
Paul

kurt wrote:

He All

I have a funny problem when closing files from a macro outside the file
I want to close. That I cant imagine what is happend.

I have in my Personal.xls a macro called Close_files.

When I execute this macro the function is to close the workbook called
test.xls.

In test.xls there is a macro - Sub Workbook_BeforeClose(Cancel As
Boolean)-
in this there is an expression - Sheets("Base informations").Select


When I run macro Close_files; Sheets("Base informations").Select --
is not selected
The rest of the
code is executed as normal


When I close test.xls; Sheets("Base informations").Select - is
selected
The rest of the code is
executed as normal

Please Help

regards
Kurt