Custom Views Applicable to the Entire Workbook

G

Greg in CO

Hi All!

I have a worksheet that refelcts the lifecycle of a project...and it is
pretty large. I want to make it easy for my users to work with, so i wanted
to create views, recorded in macors, and then linked to Command Buttons.
Unfortunately, the views only apply to the sheet on which they were recorded.

I would like to have standard views set up on a template worksheet, so that
when a new project is added and the worksheet created, the command buttons on
that new sheet trigger the macros executing the views just for that sheet.

As it is now, if I create views on ProjectA, do macros, link them to Command
Buttons and then make a copy of the sheet as ProjectB, when I click on the
button on ProjectB, the view on ProjectA cahnges.

To me, this is much like flipping the lightswitch in the bathroom and having
the garage door open.

Is there a way to make standard views and buttons applicable to an entire
workbook instead of just to one worksheet?

Thanks!
 
G

Greg in CO

Thanks Nigel!

Here is the code for two of the macros which each trigger a custom view.
One (FULL_VIEW) will unhide all the rows on the worksheet. The other
(SUMMARY_VIEW) will hide all the rows except the summary data at the top.
The views and the macros have the same names/naming convention and when I
opened the VB Editor, the macros were located in the window for Module 7

*************************** Code Starts Below

Sub SUMMARY_VIEW()
'
' SUMMARY_VIEW Macro
' Macro recorded 8/27/2008 by Greg Starr
'

'
ActiveWorkbook.CustomViews("SUMMARY_VIEW").Show
End Sub


Sub FULL_VIEW()
'
' FULL_VIEW Macro
' Macro recorded 8/27/2008 by Greg Starr
'

'
ActiveWorkbook.CustomViews("FULL_VIEW").Show
End Sub

**********************Code Ends Above

Thank for your help!

Greg
 

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

Top