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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel issue 1

Status
Not open for further replies.

wuwang

Programmer
May 16, 2001
48
US
Hello,

I had code to have the color of some cells as yellow. Now I want to clean up the whole worksheet cells color back to white. The ClearContents not for this issue.

Which function I should use?

Thanks
 
Sheet1.Range("a1:a5").Interior.Color = vbWhite Chris
LAN Admin / Programmer
cjoseph@hdii.com
 
Thanks Chris.
I put the code like this

Workbooks("xxx.xls").Worksheets(1).Interior.Color = vbWhite

But I recieved a error said "Object doesn't support this property or method.

Mine is in EXCEL 97.
 
Where are you running the code? VBA in that Excel sheet or from an external app? Chris
LAN Admin / Programmer
cjoseph@hdii.com
 
I careated a form in EXCEL. I want to put the code
in the form. This code will cleanup the background color
in the worksheet once the form initialized.
 
Try like this.

Sheet1.Cells.Interior.Color = vbWhite

Substitute SHeet1 for what ever sheet it is on. Chris
LAN Admin / Programmer
cjoseph@hdii.com
 
Hi,
Actually, what you probably THINK is white, is PROBABLY xlNone.

ActiveSheet.Cells.Interior.ColorIndex = xlNone

:) Skip,
metzgsk@voughtaircraft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top