vietnguyen1211a
New Member
- Joined
- Feb 23, 2024
- Messages
- 2
- Office Version
- 2019
- Platform
- Windows
i edit that , but its not run correctly , someone can help me? please
Sub hightlight_named_range()
Dim Print_Area As Name
Dim RangeName As Name
Dim SelectedRange As Range
On Error Resume Next
For Each RangeName In ActiveWorkbook.Names
If RangeName <> Print_Area Then
Set SelectedRange = RangeName.RefersToRange
SelectedRange.Interior.ColorIndex = 20
End If
Next RangeName
End Sub
Sub hightlight_named_range()
Dim Print_Area As Name
Dim RangeName As Name
Dim SelectedRange As Range
On Error Resume Next
For Each RangeName In ActiveWorkbook.Names
If RangeName <> Print_Area Then
Set SelectedRange = RangeName.RefersToRange
SelectedRange.Interior.ColorIndex = 20
End If
Next RangeName
End Sub