bradyboyy88
Well-known Member
- Joined
- Feb 25, 2015
- Messages
- 562
HI,
I am trying to loop through all the cells in thisworkbook and change the background color to vbyellow. My code so far is as follows:
It draws an error at the range() function which makes me think this method will not work. Any help will be appreciated.
I am trying to loop through all the cells in thisworkbook and change the background color to vbyellow. My code so far is as follows:
Code:
Sub testdata()
Dim nm As Variant
For Each nm In ThisWorkbook.Names
Range(nm.RefersTo).Interior.Color = vbYellow
Next nm
End Sub
It draws an error at the range() function which makes me think this method will not work. Any help will be appreciated.