Hi Dave - thanks for that - did not have it an a Genral Module - now it works
fine.
Thanks again...
"Dave Peterson" wrote:
What did you use for the name of your custom view?
I used myView. (Change that to what you used.)
And make sure you put that code in a general module.
And while you're testing, add on more line:
Option Explicit
Sub auto_open()
msgbox "hi from auto_open"
ThisWorkbook.CustomViews("myView").Show
End Sub
Then you'll know if your code is running or if something else is going bad.
GLT wrote:
Hi Dave,
Thanks for your reply. I inserted this code into the Workbook code section
and the Worksheet code section and it does not seem to do anything.
I have acro Security set to Medium and the Macro dialog box appears when I
open the file (and I choose to enable the Macro), but it Excel file still
opens with the same view that it was last closed with.
Any ideas what I am doing wrong?
Thanks
"Dave Peterson" wrote:
You could use a macro named Auto_open:
Option Explicit
Sub auto_open()
ThisWorkbook.CustomViews("myView").Show
End Sub
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
GLT wrote:
Hi,
Does anyone know how to set a document up so that it always opens with a
particular custom view?
Currently I am finding that my document opens up with the same custom view
that it was closed in - I would like to force this to open always in one of
the veiws only.
Thanks
--
Dave Peterson
--
Dave Peterson