Rotaing pictures in excel
Rotaing pictures in excel
(OP)
Can anyone please advise if and how pictures (such as jpg format) can be rotated in excel using VBA after they have been inserted into a workbook.
MAny thanks in advance
iken
MAny thanks in advance
iken





RE: Rotaing pictures in excel
Sub Macro1()
ActiveSheet.Shapes("Picture").Rotation = 33#
End Sub
"Picture" is the name of your picture
33# means 33 degrees
as an example
Hope this helps
Mogens
RE: Rotaing pictures in excel
mgp,
however the sub you typed only applies to drawings drawn in excel (using drawing utilities.
It does not work for either jpg or bitmap images that have been imported into a worksheet.
I am unsure if what I am requiring is possible or not, but any further assistance would be greatly appreciated.
iken
RE: Rotaing pictures in excel
You need to rotate before insertion
TTFN
RE: Rotaing pictures in excel
All I did was to record the macro while rotating the picture and then clean up the code. I tried to import a new picture and rotate this with the same code, this also worked.
I'll send you the spreadsheet if you mail me at mgp@mxl.dk
I know that some objects cannot be rotated (e.g. a text box) and I have also wondered sometimes objects are no longer rotatable even though I recalled they used to be. Never found out why though.
Could it be the properties of the picture that causes the rotation angle to freeze/lock?
regards
Mogens
RE: Rotaing pictures in excel
The code seems to work only on autoshapes created in Excel.
My email is arbiter007@hotmail.com
TTFN
RE: Rotaing pictures in excel
Thanks for the email..
TTFN
RE: Rotaing pictures in excel
So the answer to iken is that it works in Excel 2002 but apparently not in previous versions.
Regards
Mogens
RE: Rotaing pictures in excel
iken