selection.interior
Ok, I'm totally new to VBA but am learning fast. I created two macros. One
that simply colors certain text and cells white - so they dont print. And
then another that changes the text back to black and then highlights a few
cells. They're basically my show/hide buttons for text I dont want to print.
However, whenever I run the macro it hangs up on the last line of the macro
"selection.interior.colorindex = x".
Also, will this macro run on all platforms? Is there something I need to
know about VBA for Excel on a Mac versus PC?
Sub Hide_Text()
Range("g11:k61").Select
Selection.Font.ColorIndex = 2
Range("g12:g61,a12:e61,l8").Select
Selection.Interior.ColorIndex = 2
End Sub
Sub Show_Text()
Range("a11:m11,g11:k61").Select
Selection.Font.ColorIndex = 0
Range("g12:g61,b12:e61,l8").Select
Selection.Interior.ColorIndex = 19
End Sub
|