Morning All,
First off Happy New Year to you all!!
Secondly I have the following code that when i click on a graph that is assoicated with the Macro its not sizing correctly to the given cells detailed in the coding.
could anyone advise at all please?
Sub Chart6_Click()
Dim ws As Worksheet
Dim chto As ChartObject
Dim rSmall As Range, rBig As Range
Static b As Boolean
Set chto = Worksheets("Delivery Overview").ChartObjects("Chart 6")
Set rSmall = Worksheets("Delivery Overview").Range("o13:x27")
Set rBig = Worksheets("Delivery Overview").Range("D13:AY92")
If b Then
chto.BringToFront
chto.Width = rSmall.Width
chto.Height = rSmall.Height
chto.Left = rSmall.Left
chto.Top = rSmall.Top
Else
chto.BringToFront
chto.Width = rBig.Width
chto.Height = rBig.Height
chto.Left = rBig.Left
chto.Top = rBig.Top
End If
b = Not b
End Sub
Kind Regards
First off Happy New Year to you all!!
Secondly I have the following code that when i click on a graph that is assoicated with the Macro its not sizing correctly to the given cells detailed in the coding.
could anyone advise at all please?
Sub Chart6_Click()
Dim ws As Worksheet
Dim chto As ChartObject
Dim rSmall As Range, rBig As Range
Static b As Boolean
Set chto = Worksheets("Delivery Overview").ChartObjects("Chart 6")
Set rSmall = Worksheets("Delivery Overview").Range("o13:x27")
Set rBig = Worksheets("Delivery Overview").Range("D13:AY92")
If b Then
chto.BringToFront
chto.Width = rSmall.Width
chto.Height = rSmall.Height
chto.Left = rSmall.Left
chto.Top = rSmall.Top
Else
chto.BringToFront
chto.Width = rBig.Width
chto.Height = rBig.Height
chto.Left = rBig.Left
chto.Top = rBig.Top
End If
b = Not b
End Sub
Kind Regards