ActiveSheet.Shapes macro

U

ucanalways

ActiveSheet.Shapes("Chart 18").ScaleWidth 1.99, msoFalse,
msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 19").ScaleWidth 1.99, msoFalse,
msoScaleFromTopLeft

Instead of having a macro like this, I am looking for a macro that
will resize the chart to its scalewidth irrespective of the chart
name.

Something like, resize all shapes in a particular sheet to a
scalewidth like 1.99 or any other value.. Can anyone throw light on
this please?

Thanks
 
P

Peter T

Dim shp As Shape

For Each shp In ActiveSheet.Shapes
If shp.Type = msoChart Then
shp.ScaleWidth 1.99, msoFalse, msoScaleFromTopLeft

''or maybe
' With shp
' .Width = .Width * 2
' End With
End If
Next

Regards,
Peter T
 
B

Bob Phillips

Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.Type = msoChart Then
shp.ScaleWidth 1.99, msoFalse, msoScaleFromTopLeft
End If
Next shp



--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
U

ucanalways

Dim shp As Shape

For Each shp In ActiveSheet.Shapes
If shp.Type = msoChart Then
shp.ScaleWidth 1.99, msoFalse, msoScaleFromTopLeft

''or maybe
' With shp
' .Width = .Width * 2
' End With
End If
Next

Regards,
Peter T









- Show quoted text -

Bob, Peter, Thank you very much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top