Consulting

Results 1 to 4 of 4

Thread: Solved: Generated Code for Chart ... What Happened?

  1. #1

    Solved: Generated Code for Chart ... What Happened?

    I let Excel create a macro for me and it generated two statements that I don't understand:
    [vba]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[/vba] 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??

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    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.

  3. #3
    Oh, yeah, I had forgotten that they do that. Thanks, Jake.

  4. #4
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    You're Welcome

    Take Care

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •