can you share you sample workbook of 2 or 3 sheets
On Wed, Jun 8, 2011 at 6:48 PM, Kat <viridiancade...@googlemail.com> wrote: > I'm sorry, I'm still not having any luck with this. I'm getting > runtime error 91, object variable or With block not set. > > Does this mean that when you select the sheets you deselect your > chart? How do I best write the code within the loop so that I do not > get this error? > > > On Jun 6, 3:22 pm, ashish koul <koul.ash...@gmail.com> wrote: > > Sub test() > > For i = 1 To Sheets.Count > > Sheets(i).Select > > > > ' paste ur code here > > > > Next i > > > > End Sub > > > > > > > > > > > > On Mon, Jun 6, 2011 at 2:12 PM, Kat <viridiancade...@googlemail.com> > wrote: > > > Hi all, > > > > > I have a large spreadsheet, ~200 sheets. For each of these, I wish to > > > plot a series where the x values are D3:D103 and the y values are > > > E3:E103, and the series name is the same as that of the sheet, all on > > > the same chart. > > > > > So far I have > > > > > ActiveChart.SeriesCollection.NewSeries > > > ActiveChart.SeriesCollection(1).XValues = "='0,-1 '!R3C4:R103C4" > > > ActiveChart.SeriesCollection(1).Values = "='0,-1 '!R3C5:R103C5" > > > ActiveChart.SeriesCollection(1).Name = "=""0,-1 """ > > > > > However, I am not sure how to loop this action to cover all worksheets > > > in the book, and not sure how to get excel to automatically write the > > > sheet name as the series name. Any ideas? > > > > > Thanks in advance. > > > > > -K > > > > > -- > > > > > > ---------------------------------------------------------------------------------- > > > Some important links for excel users: > > > 1. Follow us on TWITTER for tips tricks and links : > > >http://twitter.com/exceldailytip > > > 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310 > > > 3. Excel tutorials athttp://www.excel-macros.blogspot.com > > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > > > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com > > > > > To post to this group, send email to excel-macros@googlegroups.com > > > > > <><><><><><><><><><><><><><><><><><><><><><> > > > Like our page on facebook , Just follow below link > > >http://www.facebook.com/discussexcel > > > > -- > > *Regards* > > * * > > *Ashish Koul* > > *akoul*.*blogspot*.com <http://akoul.blogspot.com/> > http://akoul.posterous.com/ > > *akoul*.wordpress.com <http://akoul.wordpress.com/> > > My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830> > > > > P Before printing, think about the environment.- Hide quoted text - > > > > - Show quoted text - > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- *Regards* * * *Ashish Koul* *akoul*.*blogspot*.com <http://akoul.blogspot.com/> http://akoul.posterous.com/ *akoul*.wordpress.com <http://akoul.wordpress.com/> My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830> P Before printing, think about the environment. -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel