Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
parteegolfer - 28 Feb 2006 20:33 GMT
I have entered the following and the row will not change to default
color when $A(whatever) is not equal to "Weekly Subtotal". It does
change to orange when "Weekly Subtotal" is entered into a cell but wont
change back to excel default color if cell is changed back to "". What
am i doing wrong!

Private Sub Workbook_Open()
Dim cell As Range, rng As Range
Dim Sh As Worksheet
For Each Sh In ThisWorkbook.Worksheets
For Each cell In Sh.Range("AL6:AL2000")
If cell.Value = "Weekly Subtotal" Then
Set rng = Intersect(Sh.Range("A8:J2000"), _
cell.EntireRow)
rng.Interior.ColorIndex = 45
If cell.Value = "" Then
Set rng = Intersect(Sh.Range("A8:J2000"), _
cell.EntireRow)
rng.Interior.ColorIndex = xlNone
End If
End If
Next
Next

End Sub

Signature

parteegolfer

Duke Carey - 28 Feb 2006 21:02 GMT
Private Sub Workbook_Open()
Dim cell As Range, rng As Range
Dim Sh As Worksheet

For Each Sh In ThisWorkbook.Worksheets

For Each cell In Sh.Range("AL6:AL2000")

If cell.Value = "Weekly Subtotal" Then
Set rng = Intersect(Sh.Range("A8:J2000"), _
cell.EntireRow)
rng.Interior.ColorIndex = 45
End If

If cell.Value = "" Then
Set rng = Intersect(Sh.Range("A8:J2000"), _
cell.EntireRow)
rng.Interior.ColorIndex = xlNone

End If

Next

Next

End Sub

> I have entered the following and the row will not change to default
> color when $A(whatever) is not equal to "Weekly Subtotal". It does
[quoted text clipped - 21 lines]
>
> End Sub
parteegolfer - 28 Feb 2006 21:57 GMT
This Did not work. Does anyone have any other idea for this problem.

Signature

parteegolfer

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.