PC Review


Reply
Thread Tools Rate Thread

ActiveSheet.Shapes macro

 
 
ucanalways@gmail.com
Guest
Posts: n/a
 
      22nd Oct 2007
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

 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      22nd Oct 2007
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

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      22nd Oct 2007
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)



<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
ucanalways@gmail.com
Guest
Posts: n/a
 
      22nd Oct 2007
On Oct 22, 2:13 pm, "Peter T" <peter_t@discussions> wrote:
> 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
>
> <ucanalw...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > 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- Hide quoted text -

>
> - Show quoted text -


Bob, Peter, Thank you very much

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing activesheet shapes label caption baha17@gmail.com Microsoft Excel Programming 1 31st Aug 2011 01:58 AM
trouble with selecting ActiveSheet.Shapes.Range Brian Murphy Microsoft Excel Programming 20 19th Oct 2009 05:22 PM
ActiveSheet.Shapes("Rectangle 23").Select will not work in 2007 nkat Microsoft Excel Programming 3 12th Nov 2008 05:56 PM
ActiveSheet.Shapes ole_ Microsoft Excel Programming 1 26th Apr 2005 02:34 PM
Shapes In ActiveSheet Tommi Microsoft Excel Programming 5 2nd Dec 2003 02:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:58 PM.