Solved

Line up charts

Posted on 2014-04-20
4
189 Views
Last Modified: 2014-04-20
There are 3 charts on Sheet1 of the attached file.

Question: How can I line up these charts using VBA?

The top chart Left value will be applied to the other two.

Thank you.
0
Comment
Question by:Mike Eghtebas
  • 2
4 Comments
 
LVL 15

Expert Comment

by:unknown_routine
ID: 40011326
No attachment.
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 40011329
Sorry. Here it is.
SampleChart.xlsm
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 40011354
This will change the left as well as the height and width to make all three match

ActiveSheet.Shapes("Chart 4").Left = ActiveSheet.Shapes("Chart 3").Left
ActiveSheet.Shapes("Chart 4").Width = ActiveSheet.Shapes("Chart 3").Width
ActiveSheet.Shapes("Chart 4").Height = ActiveSheet.Shapes("Chart 3").Height
ActiveSheet.Shapes("Chart 5").Left = ActiveSheet.Shapes("Chart 3").Left
ActiveSheet.Shapes("Chart 5").Width = ActiveSheet.Shapes("Chart 3").Width
ActiveSheet.Shapes("Chart 5").Height = ActiveSheet.Shapes("Chart 3").Height
0
 
LVL 33

Author Closing Comment

by:Mike Eghtebas
ID: 40011495
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
macro for finding text and replacing 7 43
Office 2016 Excel Issue 4 26
increment numbers by 10 11 29
Help Updated Qtr 2 0
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now