![]() |
Original Picture Size in VBA?
Hello,
In Excel, you are able to reset a picture to its "Original size". I'm wondering if it possible to get the original size in VBA. Consider this: In Excel, select an image in one of the cells. Right click, and select "Format Picture". In the Format Picture dialog, click the "Size" tab. At the bottom of the tab, it shows the "Original size". That is the size I would like to access via VBA. On a related note, if you press the "Reset" button while recording a macro, the code in the macro just sets the picture to a hard coded width and height. As if that is ever useful. BTW, I'm using an older version of Excel (Office 2000). However, I can't find a way to get these values even in newer versions. Howard |
Original Picture Size in VBA?
hi Howard,
'expression.ScaleHeight(Factor, RelativeToOriginalSize) 'Factor 1 = 100% With ActiveSheet.Shapes(1) .ScaleHeight 1, msoTrue .ScaleWidth 1, msoTrue End With -- isabelle |
Original Picture Size in VBA?
"isabelle" wrote in message ...
'expression.ScaleHeight(Factor, RelativeToOriginalSize) 'Factor 1 = 100% With ActiveSheet.Shapes(1) .ScaleHeight 1, msoTrue .ScaleWidth 1, msoTrue End With That's the ticket. Thanks! Howard |
All times are GMT +1. The time now is 01:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com