LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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

 
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
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Interior borders Nicole Excel Discussion (Misc queries) 5 October 17th 05 10:21 PM
Selection.Interior.ColorIndex = 0 Error [email protected] Excel Programming 3 September 28th 05 11:36 PM
RGB value of cell interior Brotha lee Excel Programming 8 May 20th 05 12:47 AM
Code to change interior colour only if current interior colour is BeSmart Excel Programming 2 October 5th 04 12:06 AM


All times are GMT +1. The time now is 02:10 PM.

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

About Us

"It's about Microsoft Excel"