Auto_open vs Workbook_open


Posted by Tim Francis-Wright on July 19, 2000 7:45 AM

I decided to replace an Auto_open VBA macro with
a Workbook_open macro in the ThisWorkbook object.

Everything works fine until the code tries to
write something in a particular sheet:

Worksheets("Public").Range("B2").Value = Application.Calculation

or

ThisWorkbook.Sheets("Public").Range("B2").Value = Application.Calculation
' this was the old code in the auto_open macro

generates one of those useful 1004 errors. Am I doing
anything stupid here? The old code worked fine.



Posted by Ivan Moala on July 20, 0100 1:50 AM

Tim
I don't know why it would do this as the code worked for me.......BUT I haven't got full code ?
Just as a side Q why Application.Calculation for
this range ?? and what other code have you got in
The Thisworkbook Object.

Ivan