vandango05
Board Regular
- Joined
- Oct 6, 2008
- Messages
- 110
Hi all. I've been using and adjusting an original function that came from this forum and have searched if someone has had this requirement before but coming up blank.
I'm looking to add a rotation to the displayed images and wonder if someone can help with the code?
Here is what i have.
I'd like the amount of rotation to be determined by a value in cell A1 for example.
Hope someone has the know-how and can help!
Thank you.
I'm looking to add a rotation to the displayed images and wonder if someone can help with the code?
Here is what i have.
Code:
Function ShowPicR(PicFile As String) As Boolean
Dim AC As Range
Static P As Shape
On Error GoTo done
Set AC = Application.Caller
If PicExists(P) Then
P.Delete
Else
'look for a picture already over cell
'For Each P In ActiveSheet.Shapes
For Each P In ActiveSheet.Shapes
If P.Type = msoLinkedPicture Then
If P.Left >= AC.Left And P.Left < AC.Left + AC.Width Then
If P.Top >= AC.Top And P.Top < AC.Top + AC.height Then
P.Delete
Exit For
End If
End If
End If
Next P
End If
Set P = ActiveSheet.Shapes.AddPicture(PicFile, True, True, AC.Left - Range("dn55"), AC.Top - Range("do55"), Range("DN63"), Range("DO63"))
ShowPicR = True
Exit Function
done:
ShowPicR = False
End Function
I'd like the amount of rotation to be determined by a value in cell A1 for example.
Hope someone has the know-how and can help!
Thank you.