-
Set the original Width and Height of a Chart in VBA
Hi All,
I need to set the original width and height of a chart that is added to excel work book in a PowerPoint. Initially when i add the work book ole object am able to set the original width and height. But When the chart is added the width and height are changing. I had used the code below for adding this:
Dim xlCurrChart As Excel.Chart
Dim xlBook As Excel.Workbook
Dim pptShape As PowerPoint.Shape
Set pptShape = rpptTarget.Shapes.AddOLEObject(Width:=fDefaultWidth,
Height:=fDefaultHeight, ClassName:="Excel.Sheet")
Set xlBook = pptShape.OLEFormat.ObjectSet xlCurrChart = xlBook.Charts.Add()
Please advice me how to achive this
regards,
Abhi
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules