+ Reply to Thread
Results 1 to 5 of 5

Default Custom View

  1. #1
    GLT
    Guest

    Default Custom View

    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

  2. #2
    Dave Peterson
    Guest

    Re: Default Custom View

    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

  3. #3
    GLT
    Guest

    Re: Default Custom View

    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
    >


  4. #4
    Dave Peterson
    Guest

    Re: Default Custom View

    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

  5. #5
    GLT
    Guest

    Re: Default Custom View

    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
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1