Thread
:
Trouble with Elseif command
View Single Post
#
4
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Trouble with Elseif command
try
Sub aa()
With Range("a4:m4").Interior
If Range("h4") 1 Then
.ColorIndex = 3
ElseIf Range("i4") 1 Then
..ColorIndex = 0
'Else 'do what??
'.ColorIndex=???
End If
End With
End Sub
--
Don Guillett
SalesAid Software
"Keith" wrote in message
...
Hello all...
trying to run the following simple program but it will not run. Have
tried
the offline help and followed the example to the letter but with no luck.
Any ideas would be appreciated.
Sub ContractHighlight()
'
' ContractHighlight Macro
' Macro recorded 23/11/2004 by Keith Holden
'
'If h4 1 Then
Range("A4:M4").Select
Selection.Interior.ColorIndex = 3
ElseIf i4 1 Then
Range("A4:M4").Select
Selection.Interior.ColorIndex = 2
End If
End Sub
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]