Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Can I print a list of custom views

I need to print a list of custom views that have been established. Is there a
way?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default Can I print a list of custom views

James

This code will add a sheet called CustomViews and list them and whether they
have their print and filter settings turned on. There is currently no
checking for the Custom View sheet existing but that could be simply added.
Print this sheet then.

Sub ListCustomViews()
Dim view As CustomView
Dim viewWks As Worksheet
Dim cntr As Integer
If ActiveWorkbook.CustomViews.Count = 0 Then
MsgBox "There are no views", vbInformation + vbOKOnly
Exit Sub
End If
Set viewWks = ActiveWorkbook.Worksheets.Add
With viewWks
.Name = "Custom Views"
With .Range("A1:C1")
.Value = Array("View Name", _
"Print Settings", "Filter Settings")
.Font.Bold = True
End With
End With
cntr = 2
For Each view In ActiveWorkbook.CustomViews
With viewWks
.Range("A" & cntr).Value = view.Name
.Range("B" & cntr).Value = view.PrintSettings
.Range("C" & cntr).Value = view.RowColSettings
End With
cntr = cntr + 1
Next view
viewWks.Range("A:C").Columns.AutoFit
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non-tech): www.nickhodge.co.uk/blog/


"James Quigley" wrote in message
...
I need to print a list of custom views that have been established. Is there
a
way?


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 Dave F Excel Discussion (Misc queries) 1 November 17th 06 04:11 PM
custom views Mac Excel Worksheet Functions 1 October 5th 06 06:38 PM
Custom Views Stu W Excel Discussion (Misc queries) 1 August 6th 06 05:01 PM
Custom Views Dana Excel Worksheet Functions 1 March 6th 06 09:52 PM
Custom Views Dropdown List Jim Palmer Excel Discussion (Misc queries) 3 June 22nd 05 10:22 PM


All times are GMT +1. The time now is 12:49 PM.

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

About Us

"It's about Microsoft Excel"