View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default rotate picture based on cell value

You very rarely need to select an object to work with it. By not selecting the
object, it should make the code easier to read, too.

Option Explicit
Sub testme()

Dim myShape As Shape

Set myShape = ActiveSheet.Shapes("Picture 1")

myShape.IncrementRotation 45

MsgBox "Hey, it's crooked!"

myShape.Rotation = 0

MsgBox "Back to normal!"

End Sub



elwood wrote:

great thanks - is there a function for absolute rotation? Lets say the image sits a 87 to start with and I want to rotate it back to 0 - Currently if i enter 0, obviously nothing happens, since the rotation is relative.

---
frmsrcurl: http://msgroups.net/microsoft.public...-on-cell-value


--

Dave Peterson