A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

another simple question



 
 
Thread Tools Display Modes
  #1  
Old September 20th, 2003, 02:32 AM
MoiraGunn
external usenet poster
 
Posts: n/a
Default another simple question

Hi all,
I want to delete the last row in a matrix using a macro.
I know how to select the last cell but not the last row.
Can any one help?

Thanks, Kathy


Ads
  #2  
Old September 20th, 2003, 03:05 AM
J.E. McGimpsey
external usenet poster
 
Posts: n/a
Default another simple question

one way:

If you know the last cell, just use it's entirerow property:

lastCell.EntireRow.Delete

or, if you know the range:

With Range("A1").CurrentRegion
.Item(.Count).EntireRow.Delete
End With


In article ,
"MoiraGunn" wrote:

Hi all,
I want to delete the last row in a matrix using a macro.
I know how to select the last cell but not the last row.
Can any one help?

Thanks, Kathy


  #3  
Old September 20th, 2003, 05:21 AM
MoiraGunn
external usenet poster
 
Posts: n/a
Default another simple question

That worked thanks!!

"J.E. McGimpsey" wrote in message
...
one way:

If you know the last cell, just use it's entirerow property:

lastCell.EntireRow.Delete

or, if you know the range:

With Range("A1").CurrentRegion
.Item(.Count).EntireRow.Delete
End With


In article ,
"MoiraGunn" wrote:

Hi all,
I want to delete the last row in a matrix using a macro.
I know how to select the last cell but not the last row.
Can any one help?

Thanks, Kathy




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 OfficeFrustration.
The comments are property of their posters.