forked from Vitosh/VBA_personal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConditionalFormat.vb
More file actions
38 lines (28 loc) · 1.07 KB
/
Copy pathConditionalFormat.vb
File metadata and controls
38 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Sub ListAllConditionalFormat()
Dim cf As FormatCondition
Dim ws As Worksheet
Dim l As Long
Dim rngCell As Range
On Error Resume Next
Application.EnableEvents = False
Application.ScreenUpdating = False
tblPrint.Cells.Clear
For Each ws In ThisWorkbook.Worksheets
Debug.Print ws.Name
For Each cf In ws.Cells.FormatConditions
l = 1 + l
With tblPrint
Set rngCell = Cells(l, 1)
rngCell = cf.AppliesTo.Address
rngCell.Offset(0, 1) = cf.Type
rngCell.Offset(0, 2) = "'" & cf.Formula1
rngCell.Offset(0, 3) = cf.Interior.Color
rngCell.Offset(0, 4) = cf.Font.Name
rngCell.Offset(0, 5) = ws.Name
rngCell.Offset(0, 6) = "'" & cf.AppliesTo.AddressLocal
rngCell.Offset(0, 7) = "'" & cf.Formula2
End With
Next cf
Next ws
Debug.Print "END!"
End Sub