#1   Report Post  
GLT
 
Posts: n/a
Default 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   Report Post  
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
GLT
 
Posts: n/a
Default 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   Report Post  
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
GLT
 
Posts: n/a
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you link a custom property to an Excel custom header text? LouErc Setting up and Configuration of Excel 0 November 8th 05 04:58 PM
Custom views, filters sensitive, in a share workbook an protect sh Andre Fernandes New Users to Excel 0 October 31st 05 09:36 PM
Custom Lists in Excel Custom Lists in Excel Excel Discussion (Misc queries) 1 October 24th 05 07:43 PM
Default template for a group markvi Excel Discussion (Misc queries) 0 October 19th 05 08:40 PM
Custom Auto Filter default setting should be contains dmc Excel Worksheet Functions 0 June 14th 05 07:54 AM


All times are GMT +1. The time now is 07:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"