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

Is there macro lnaguage to toggle between custom views? TIA

Greg

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default 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
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 Mervyn Thomas[_2_] Setting up and Configuration of Excel 0 September 5th 08 04:42 PM
Custom Views Khardy3352 New Users to Excel 2 June 22nd 08 01:37 PM
Custom Views KeithMeister Setting up and Configuration of Excel 2 October 30th 07 09:58 PM
custom views Mac Excel Worksheet Functions 1 October 5th 06 06:38 PM
Custom views Wagi123 Excel Discussion (Misc queries) 2 February 10th 06 10:03 AM


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