View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
alymcmorland[_11_] alymcmorland[_11_] is offline
external usenet poster
 
Posts: 1
Default macros don't work


Can anyone see anything wrong with this code, because when i try execute
each one nothing happens and its as if i haven't executed anything at
all!


Code:
--------------------

Sub Macro_ContractTermination()
Dim c As Range


For Each c In Range(ActiveCell, Cells(370, ActiveCell.Column))
If c.Interior.ColorIndex = 15 Or c.Interior.ColorIndex < 0 And Len(c) = 0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 56
End If

Next c

End Sub


Sub Macro_ContractReinablation()
Dim c As Range


For Each c In Range(ActiveCell, Cells(370, ActiveCell.Column))
If c.Interior.ColorIndex = 56 Or c.Interior.ColorIndex < 0 And Len(c) = 0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 15
End If

Next c

End Sub


Sub Macro_BankHoliday()
Dim c As Range


For Each c In Range(Cells(ActiveCell.Row, 4), Cells(ActiveCell.Row, 56))
If c.Interior.ColorIndex = 56 Or c.Interior.ColorIndex < 0 And Len(c) = 0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 15
End If

Next c

End Sub


Sub Macro_WorkingDay()
Dim c As Range


For Each c In Range(Cells(ActiveCell.Row, 4), Cells(ActiveCell.Row, 56))
If c.Interior.ColorIndex = 15 Or c.Interior.ColorIndex < 0 And Len(c) = 0 And c.FormulaR1C1 = "" Then
c.Interior.ColorIndex = 56
End If

Next c

End Sub


--------------------


--
alymcmorland
------------------------------------------------------------------------
alymcmorland's Profile: http://www.excelforum.com/member.php...o&userid=27652
View this thread: http://www.excelforum.com/showthread...hreadid=478716