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

excel automatic formatting 1

Status
Not open for further replies.

evilmousse

Programmer
Apr 15, 2003
85
0
0
US
I'm attempting to format an automatically output excel file
before the user receives it. I've succeeded in freezing the panes as I need to, but I'm having some troubles setting the background color of the title row. I can see the code I already have does indeed set the bg color, but then it is set away again. All of it happens in a flash, but not so fast I couldn't spot it happening.

here's my code:

Rows("1:1").Select
With Selection.Interior
.ColorIndex = 6
.PatternColorIndex = xlAutomatic
End With

thx in advance
-g
 
Hi,

Something else must be happening further down in your code.

All you need is...
Code:
Rows("1:1").Interior.ColorIndex = 6
Check my FAQ faq707-4105

:)

Skip,
Skip@TheOfficeExperts.com
 
Hunh.
Worked.
I wish i had the spare time to spend figuring out the difference between our code.
thanks much.

-g
 
You only need the time to read Skip's FAQ: faq707-4105

That Should show you the difference! [thumbsup2]



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top