Funny macros

  • Thread starter Thread starter Phil Hageman
  • Start date Start date
P

Phil Hageman

These two macros are assigned to individual forms buttons
on various worksheets named "Customer" and "Metrics"

Sub GoToPPVChart()
Sheets("Metrics").Select
Range("A1").Select
With ActiveSheet.ChartObjects("Chart 13")
.Height = 660
.Width = 780
.Top = 10
.Left = 125
End With
End Sub

Sub GoToUtilizationChart()
Sheets("Metrics").Select
Range("A1").Select
With ActiveSheet.ChartObjects("Chart 17")
.Height = 660
.Width = 780
.Top = 10
.Left = 125
End With
End Sub

Chart names are correct, no error handling code.

Problem: Sub GoToUtilizationChart() works as instructed.
GoToPPVChart() does not make the chart visible on screen -
the Utilization chart continues to cover the PPV chart.

When I run the PPV macro I would like that chart to be on
top (visible) of the Utilization Chart.

How do I modify this code to bring this about?

Thanks, Phil
 
Sub GoToPPVChart()
Sheets("Metrics").Select
Range("A1").Select
With ActiveSheet.ChartObjects("Chart 13")
.Height = 660
.Width = 780
.Top = 10
.Left = 125
.BringtoFront
End With
End Sub

Sub GoToUtilizationChart()
Sheets("Metrics").Select
Range("A1").Select
With ActiveSheet.ChartObjects("Chart 17")
.Height = 660
.Width = 780
.Top = 10
.Left = 125
.BringtoFront
End With
End Sub
 
This Works! And solved a problem I have been struggling
for for the whole week. Now I can enjoy the weekend.
Thanks, Tom
 
Back
Top