PDA

View Full Version : Solved: Generated Code for Chart ... What Happened?



Cyberdude
03-29-2006, 01:31 PM
I let Excel create a macro for me and it generated two statements that I don't understand:
Sub TestSelection()
'Click on chart
ActiveSheet.ChartObjects("Chart 134").Activate
ActiveChart.Axes(xlValue).MajorGridlines.Select
'Click on window to deselect chart
ActiveWindow.Visible = False
Windows("Rydex Benchmk.xls").Activate
Range("DX23").Select
End Sub It's the red statements I don't understand. It looks like it's making the window invisible, but that didn't occur. What did the "Windows....Activate" do??

Jacob Hilderbrand
03-29-2006, 02:26 PM
There is a chart window that it was closing (kinda). So the chart window closed and the chart went back to being embedded on the sheet.

Cyberdude
03-29-2006, 04:02 PM
Oh, yeah, I had forgotten that they do that. Thanks, Jake.

Jacob Hilderbrand
03-29-2006, 06:39 PM
You're Welcome :beerchug:

Take Care