Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can you link a custom property to an Excel custom header text? | Setting up and Configuration of Excel | |||
Custom views, filters sensitive, in a share workbook an protect sh | New Users to Excel | |||
Custom Lists in Excel | Excel Discussion (Misc queries) | |||
Default template for a group | Excel Discussion (Misc queries) | |||
Custom Auto Filter default setting should be contains | Excel Worksheet Functions |