Funny macros

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
 
T

Tom Ogilvy

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
 
P

Phil Hageman

This Works! And solved a problem I have been struggling
for for the whole week. Now I can enjoy the weekend.
Thanks, Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top