J
John
I got a response for this but I get error messages when I
run the subroutine. Hoping someone can provide another
solution.
This is what I need.
I have several charts that change based on various
parameters. I like to save these charts after I change
the scenarios via a commandbutton's click event.
then use Sheets.add procedure to add a new sheet everytime
the user clicks it, copy the charts and paste them onto
this newly added sheet.
The problem is that the charts are scattered in various
different sheets and so I need to know what is the name of
the most recently added sheet so that I can use worksheet
("XYZ").Select.... then .... paste..
How can I do that given this?
What I have so far is something like this:
Private Sub commandbutton1_click()
ActiveSheet.ChartObjects("Chart 735").Activate
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Copy
ActiveWindow.Visible = False
Sheets.Add
'this will add a sheet#
Sheet#.select
activesheet.paste
But I need to somehow refer to this sheet's name.
thanks
run the subroutine. Hoping someone can provide another
solution.
This is what I need.
I have several charts that change based on various
parameters. I like to save these charts after I change
the scenarios via a commandbutton's click event.
then use Sheets.add procedure to add a new sheet everytime
the user clicks it, copy the charts and paste them onto
this newly added sheet.
The problem is that the charts are scattered in various
different sheets and so I need to know what is the name of
the most recently added sheet so that I can use worksheet
("XYZ").Select.... then .... paste..
How can I do that given this?
What I have so far is something like this:
Private Sub commandbutton1_click()
ActiveSheet.ChartObjects("Chart 735").Activate
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Copy
ActiveWindow.Visible = False
Sheets.Add
'this will add a sheet#
Sheet#.select
activesheet.paste
But I need to somehow refer to this sheet's name.
thanks