Default Custom View

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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.
 
Hi Dave - thanks for that - did not have it an a Genral Module - now it works
fine.

Thanks again...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top