Hi All,
I have the following code which i am using multiple times within the same sheet to enlarge graphs.(where i have highlighted red the code would change for the different graphs and their small location)
Sub AccidentVsCaseRate()
Dim ws As Worksheet
Dim chto As ChartObject
Dim rSmall As Range, rBig As Range
Static b As Boolean
Set chto = Worksheets("Dashboard").ChartObjects(1)
Set rSmall = Worksheets("Dashboard").Range("B6:H14")
Set rBig = Worksheets("Dashboard").Range("B6:X35")
If b Then
chto.Width = rSmall.Width
chto.Height = rSmall.Height
chto.Left = rSmall.Left
chto.Top = rSmall.Top
Else
chto.Width = rBig.Width
chto.Height = rBig.Height
chto.Left = rBig.Left
chto.Top = rBig.Top
End If
b = Not b
End Sub
My issue is when i click on on graph some of the others still show over the top of the graph, How can the above coding be changed so no matter which graph is enlarged the selected graph is show in full detail without nothing being over the top of it.
Regards
I have the following code which i am using multiple times within the same sheet to enlarge graphs.(where i have highlighted red the code would change for the different graphs and their small location)
Sub AccidentVsCaseRate()
Dim ws As Worksheet
Dim chto As ChartObject
Dim rSmall As Range, rBig As Range
Static b As Boolean
Set chto = Worksheets("Dashboard").ChartObjects(1)
Set rSmall = Worksheets("Dashboard").Range("B6:H14")
Set rBig = Worksheets("Dashboard").Range("B6:X35")
If b Then
chto.Width = rSmall.Width
chto.Height = rSmall.Height
chto.Left = rSmall.Left
chto.Top = rSmall.Top
Else
chto.Width = rBig.Width
chto.Height = rBig.Height
chto.Left = rBig.Left
chto.Top = rBig.Top
End If
b = Not b
End Sub
My issue is when i click on on graph some of the others still show over the top of the graph, How can the above coding be changed so no matter which graph is enlarged the selected graph is show in full detail without nothing being over the top of it.
Regards