Cyberdude
09-24-2005, 10:47 AM
When I combine two statements into one, it doesn't work. What's the problem here: :banghead:
Sub TestPhfft()
'The next 2 lines work OK
ActiveSheet.Shapes("Rectangle 3").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 3
'The next line gets a Runtime Error 438:
' "Object doesn't support this property or method"
ActiveSheet.Shapes("Rectangle 3").ShapeRange.Fill.ForeColor.SchemeColor = 3
End Sub
Sub TestPhfft()
'The next 2 lines work OK
ActiveSheet.Shapes("Rectangle 3").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 3
'The next line gets a Runtime Error 438:
' "Object doesn't support this property or method"
ActiveSheet.Shapes("Rectangle 3").ShapeRange.Fill.ForeColor.SchemeColor = 3
End Sub