Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Cell Color in Excel Spreadsheet 2

Status
Not open for further replies.

chadau

Programmer
Nov 14, 2002
155
US
How do I change the color of a Cell in an Excel Spreadsheet using the Excel Worksheet class from a VB app?
 
Bit of a general question but lets say you have an excel object defined as ExcelApp

With ExcelApp.workbooks("Workbookname").worksheets("WorksheetName")
.range("A1").interior.colorindex = 3
end with

will change the background colour of cell A1 to red

Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Chadau - I'm not asking for a star here but I've had a look at your profile and you have made 32 posts and have not awarded any stars - and I can't believe that you have not received helpful information in at least one of those posts. Here at Tek-Tips, the accepted way of saying thanks is to award a star. This also helps those users who use the search facility, to home in on those posts that have been deemed "Helpful or Expert"
To award a star, simply click on the "Mark this post as a helpful / expert post" on the appropriate posting

Please accept this post as a bit of information for you and not a request for a star.

Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Truth is buddy that I have received a lot of help from Tech Tips in general, and until now I wasn't really aware of the star system.
 
No probs - I figured as much - hence the post.
:0)

Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top