|
Prev: powerpoint freezes
Next: Powerpoint Headers and Footers
From: Iorav Marz on 12 May 2008 16:42 Hi- yes, the operation must be performed on a selected table. I've actually already disabled the screen updates (which helped speed things up), but the individual deletion of rows is still incredibly slow given the number of rows and tables. Any way to delete the rows at the same time? I think in Excel it is possible but is it not in PowerPoint? "Steve Rindsberg" wrote: > In article <DB5A732D-FD3B-42B3-AE9E-4865147BB8ED(a)microsoft.com>, Iorav Marz > wrote: > > Hello, > > > > I would like to select multiple rows of a table in PowerPoint and then > > delete these rows. In the past, I have used code that deletes rows one at a > > time. However, I am applying this code on many tables over 100 slides and > > recursively cycling through rows one by one is very slow. > > Does the code rely on a selected table, as in your example? If you can > eliminate that, the table may not update itself on screen with each change. > This can often speed things up tremendously. > > > > > Is there a way to modify the code to perform the delete operation all at once? > > > > With ActiveWindow.Selection.ShapeRange(1).Table > > > > For Z = 2 To 10 > > ..Rows(Z).Delete > > Next > > End With > > > > Ideally, I was hoping that the .rows(Z) property could be modified to > > include a range of rows instead of just a single row. Something like > > ..rows("2:10") although that doesn't seem to work. > > > > Thanks. > > > > ----------------------------------------- > Steve Rindsberg, PPT MVP > PPT FAQ: www.pptfaq.com > PPTools: www.pptools.com > ================================================ > > >
From: John Wilson john AT technologytrish.co DOT on 13 May 2008 05:58 Just an aside really. Does your code actually delete rows 2 -10? I would expect it to delete 2,4,6,8,10 etc -- ------------------------------------------- Amazing PPT Hints, Tips and Tutorials http://www.PPTAlchemy.co.uk http://www.technologytrish.co.uk email john AT technologytrish.co.uk "Iorav Marz" wrote: > Hi- yes, the operation must be performed on a selected table. I've actually > already disabled the screen updates (which helped speed things up), but the > individual deletion of rows is still incredibly slow given the number of rows > and tables. > > Any way to delete the rows at the same time? I think in Excel it is possible > but is it not in PowerPoint? > > "Steve Rindsberg" wrote: > > > In article <DB5A732D-FD3B-42B3-AE9E-4865147BB8ED(a)microsoft.com>, Iorav Marz > > wrote: > > > Hello, > > > > > > I would like to select multiple rows of a table in PowerPoint and then > > > delete these rows. In the past, I have used code that deletes rows one at a > > > time. However, I am applying this code on many tables over 100 slides and > > > recursively cycling through rows one by one is very slow. > > > > Does the code rely on a selected table, as in your example? If you can > > eliminate that, the table may not update itself on screen with each change. > > This can often speed things up tremendously. > > > > > > > > Is there a way to modify the code to perform the delete operation all at once? > > > > > > With ActiveWindow.Selection.ShapeRange(1).Table > > > > > > For Z = 2 To 10 > > > ..Rows(Z).Delete > > > Next > > > End With > > > > > > Ideally, I was hoping that the .rows(Z) property could be modified to > > > include a range of rows instead of just a single row. Something like > > > ..rows("2:10") although that doesn't seem to work. > > > > > > Thanks. > > > > > > > ----------------------------------------- > > Steve Rindsberg, PPT MVP > > PPT FAQ: www.pptfaq.com > > PPTools: www.pptools.com > > ================================================ > > > > > >
From: Iorav Marz on 13 May 2008 09:16 Actually, the full code I am using has variables in place for "2" and "10"... it really depends on the table. I put in "2-10" to simplify the example. So does anyone know a way of deleting these rows at the same time? Thanks. "John Wilson" wrote: > Just an aside really. Does your code actually delete rows 2 -10? > > I would expect it to delete 2,4,6,8,10 etc > -- > ------------------------------------------- > Amazing PPT Hints, Tips and Tutorials > > http://www.PPTAlchemy.co.uk > http://www.technologytrish.co.uk > email john AT technologytrish.co.uk > > > "Iorav Marz" wrote: > > > Hi- yes, the operation must be performed on a selected table. I've actually > > already disabled the screen updates (which helped speed things up), but the > > individual deletion of rows is still incredibly slow given the number of rows > > and tables. > > > > Any way to delete the rows at the same time? I think in Excel it is possible > > but is it not in PowerPoint? > > > > "Steve Rindsberg" wrote: > > > > > In article <DB5A732D-FD3B-42B3-AE9E-4865147BB8ED(a)microsoft.com>, Iorav Marz > > > wrote: > > > > Hello, > > > > > > > > I would like to select multiple rows of a table in PowerPoint and then > > > > delete these rows. In the past, I have used code that deletes rows one at a > > > > time. However, I am applying this code on many tables over 100 slides and > > > > recursively cycling through rows one by one is very slow. > > > > > > Does the code rely on a selected table, as in your example? If you can > > > eliminate that, the table may not update itself on screen with each change. > > > This can often speed things up tremendously. > > > > > > > > > > > Is there a way to modify the code to perform the delete operation all at once? > > > > > > > > With ActiveWindow.Selection.ShapeRange(1).Table > > > > > > > > For Z = 2 To 10 > > > > ..Rows(Z).Delete > > > > Next > > > > End With > > > > > > > > Ideally, I was hoping that the .rows(Z) property could be modified to > > > > include a range of rows instead of just a single row. Something like > > > > ..rows("2:10") although that doesn't seem to work. > > > > > > > > Thanks. > > > > > > > > > > ----------------------------------------- > > > Steve Rindsberg, PPT MVP > > > PPT FAQ: www.pptfaq.com > > > PPTools: www.pptools.com > > > ================================================ > > > > > > > > >
From: Steve Rindsberg on 13 May 2008 08:28 In article <24C0F813-06BF-4B5D-8A10-1D1ED911EB9F(a)microsoft.com>, Iorav Marz wrote: > Hi- yes, the operation must be performed on a selected table. Try storing a reference to the table in a variable then deselecting it. Do your work on the unselected table, then reselect it if need be. I don't know of any way to delete multiple rows at a time (though that shouldn't be taken as proof that it's not possible! <g>) I've actually > already disabled the screen updates (which helped speed things up), but the > individual deletion of rows is still incredibly slow given the number of rows > and tables. > > Any way to delete the rows at the same time? I think in Excel it is possible > but is it not in PowerPoint? > > "Steve Rindsberg" wrote: > > > In article <DB5A732D-FD3B-42B3-AE9E-4865147BB8ED(a)microsoft.com>, Iorav Marz > > wrote: > > > Hello, > > > > > > I would like to select multiple rows of a table in PowerPoint and then > > > delete these rows. In the past, I have used code that deletes rows one at a > > > time. However, I am applying this code on many tables over 100 slides and > > > recursively cycling through rows one by one is very slow. > > > > Does the code rely on a selected table, as in your example? If you can > > eliminate that, the table may not update itself on screen with each change. > > This can often speed things up tremendously. > > > > > > > > Is there a way to modify the code to perform the delete operation all at once? > > > > > > With ActiveWindow.Selection.ShapeRange(1).Table > > > > > > For Z = 2 To 10 > > > ..Rows(Z).Delete > > > Next > > > End With > > > > > > Ideally, I was hoping that the .rows(Z) property could be modified to > > > include a range of rows instead of just a single row. Something like > > > ..rows("2:10") although that doesn't seem to work. > > > > > > Thanks. > > > > > > > ----------------------------------------- > > Steve Rindsberg, PPT MVP > > PPT FAQ: www.pptfaq.com > > PPTools: www.pptools.com > > ================================================ > > > > > > > ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================
From: Iorav Marz on 13 May 2008 13:41
Hi Steve and thanks for the help. The macro runs through all tables in the PowerPoint presentation and deletes rows based on their position on the slide. Once the macro is finished with a tables, it then moves to the next slide and performs the operation on the next table. It continues doing this until it reaches the end of the presentation. Could you please expand on your recommendation to "storing a reference to the table in a variable then deselecting it" and "do your work on the unselected table, then reselect it if need be"? I'm unclear as to how that will help me in this case. I've isolated the row deletion portion of the macro because it is the one piece of code that is significantly slowing it down. If anyone could identify a way to delete rows on a table at the same time rather than cycling through them individually, I would greatly appreciate it! "Steve Rindsberg" wrote: > In article <24C0F813-06BF-4B5D-8A10-1D1ED911EB9F(a)microsoft.com>, Iorav Marz wrote: > > Hi- yes, the operation must be performed on a selected table. > > Try storing a reference to the table in a variable then deselecting it. > Do your work on the unselected table, then reselect it if need be. > > I don't know of any way to delete multiple rows at a time (though that shouldn't be > taken as proof that it's not possible! <g>) > > > I've actually > > already disabled the screen updates (which helped speed things up), but the > > individual deletion of rows is still incredibly slow given the number of rows > > and tables. > > > > Any way to delete the rows at the same time? I think in Excel it is possible > > but is it not in PowerPoint? > > > > "Steve Rindsberg" wrote: > > > > > In article <DB5A732D-FD3B-42B3-AE9E-4865147BB8ED(a)microsoft.com>, Iorav Marz > > > wrote: > > > > Hello, > > > > > > > > I would like to select multiple rows of a table in PowerPoint and then > > > > delete these rows. In the past, I have used code that deletes rows one at a > > > > time. However, I am applying this code on many tables over 100 slides and > > > > recursively cycling through rows one by one is very slow. > > > > > > Does the code rely on a selected table, as in your example? If you can > > > eliminate that, the table may not update itself on screen with each change. > > > This can often speed things up tremendously. > > > > > > > > > > > Is there a way to modify the code to perform the delete operation all at once? > > > > > > > > With ActiveWindow.Selection.ShapeRange(1).Table > > > > > > > > For Z = 2 To 10 > > > > ..Rows(Z).Delete > > > > Next > > > > End With > > > > > > > > Ideally, I was hoping that the .rows(Z) property could be modified to > > > > include a range of rows instead of just a single row. Something like > > > > ..rows("2:10") although that doesn't seem to work. > > > > > > > > Thanks. > > > > > > > > > > ----------------------------------------- > > > Steve Rindsberg, PPT MVP > > > PPT FAQ: www.pptfaq.com > > > PPTools: www.pptools.com > > > ================================================ > > > > > > > > > > > > > ----------------------------------------- > Steve Rindsberg, PPT MVP > PPT FAQ: www.pptfaq.com > PPTools: www.pptools.com > ================================================ > > > |