Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Please help with Custom Views

Hello all,

I have an Excel file with 4 worksheets. Of the 4 worksheets, I have two
types of custom views ("Comparison" and "Non-Comparison") in each of the 3
worksheets. In the 4th worksheet, I have a command button to change to a
type of custom view in 3 worksheets, and below is a code of the command
button.

Private Sub cmdCustomView()

If Worksheets ("Sheet4").Range("A1").Value = "Comparison" Then

ThisWorkbook.CustomViews("Sheet1 - Comparison").Show
ThisWorkbook.CustomViews("Sheet2 - Comparison").Show
ThisWorkbook.CustomViews("Sheet3 - Comparison").Show

ElseIf Worksheets ("Sheet4").Range("A1").Value = "Non-Comparison" Then

ThisWorkbook.CustomViews("Sheet1 - Non-Comparison").Show
ThisWorkbook.CustomViews("Sheet2 - Non-Comparison").Show
ThisWorkbook.CustomViews("Sheet3 - Non-Comparison").Show

Else

MsgBox "Please select a type of custom view from the list in Cell A1.",
vbCritical, "Custom Views"

End If

End Sub

The problem that I am having is custom views do not stay on all 3
worksheets. For example, if I select "Comparison" in Cell A1 of Sheet4 and
click the button, the custom view "Comparison" happens only on Sheet3 and
does not happen on Sheet1 and Sheet2.

How can I write a code to make sure that the custom view happens on all
three worksheets?

Thanks.
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
Custom Views parls Excel Discussion (Misc queries) 1 April 7th 10 11:02 PM
Custom Views!!! Mervyn Thomas[_2_] Setting up and Configuration of Excel 2 October 2nd 08 09:30 AM
Custom Views Khardy3352 New Users to Excel 2 June 22nd 08 01:37 PM
Custom Views Dave F Excel Discussion (Misc queries) 1 November 17th 06 04:11 PM
Custom Views Dana Excel Worksheet Functions 1 March 6th 06 09:52 PM


All times are GMT +1. The time now is 06:42 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"