Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Custom Views
Is there macro lnaguage to toggle between custom views? TIA
Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Custom Views
I don't use custom views, but why not use the macro recorder while switching
between views, then see what code it generates? Hope this helps, Hutch "GregR" wrote: Is there macro lnaguage to toggle between custom views? TIA Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Custom Views
Try something like
Sub ToggleViews() Static ViewName As String If ViewName = "View1" Then ThisWorkbook.CustomViews("View2").Show ViewName = "View2" Else ThisWorkbook.CustomViews("View1").Show ViewName = "View1" End If End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "GregR" wrote in message ps.com... Is there macro lnaguage to toggle between custom views? TIA Greg |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Custom Views
Chip, thank you very much, that did the trick
Greg Chip Pearson wrote: Try something like Sub ToggleViews() Static ViewName As String If ViewName = "View1" Then ThisWorkbook.CustomViews("View2").Show ViewName = "View2" Else ThisWorkbook.CustomViews("View1").Show ViewName = "View1" End If End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "GregR" wrote in message ps.com... Is there macro lnaguage to toggle between custom views? TIA Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom Views | Setting up and Configuration of Excel | |||
Custom Views | New Users to Excel | |||
Custom Views | Setting up and Configuration of Excel | |||
custom views | Excel Worksheet Functions | |||
Custom views | Excel Discussion (Misc queries) |