View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Keith R[_3_] Keith R[_3_] is offline
external usenet poster
 
Posts: 30
Default flip an autoshape using VBA- recorded macro doesn't work

I have a shape (block arrow) that I need to flip using VBA.

I recorded the action using macro recorder and got:

Sheet1.Shapes("AutoShape 17").Select
Selection.ShapeRange.Flip msoFlipVertical

When I run these two lines in a sub all by themselves, it works and the
arrow flips. When I use the same two lines embedded in code, I get: "does
not support this property or method" error 438

If OldArrowDir < ArrowDir Then
Sheet1.Shapes("AutoShape 17").Select
Selection.ShapeRange.Flip msoFlipVertical
Sheet1.Range("C7").Value = ArrowDir
End If


running in debug, it does hit each line, and it is crashing on the line:
Selection.ShapeRange.Flip msoFlipVertical


any ideas?
much thanks,
Keith