Thread: Closing methods
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Closing methods

What has Auto_Open got to do with anything here? He is using BeforeClose
which does run from code quite happily.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ps.com...
Hi
I thought you could not fire an Auto_Open macro, say, if you opened the
file with code. Is that not the case? (I'm too lazy to go check
myself!)
regards
Paul

Bob Phillips wrote:

It is probably trying to close a worksheet in the workbook that is

running
the macro. Change it to

ThisWorkbook.Sheets("Base informations").Select


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kurt" wrote in message
ups.com...
Hi

The code is running smoothly in the test.xls file when I close it
directly

When I close it from the macro in Personal.xls I can follow the codes
execution, but it do not execute this step ;
That means that if I want to update something in the ("Gase
Information") sheet it will not be updated there byt on the sheet

there
is active and this is odd..

regards

Kurt


skrev:
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