ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vba delete (https://www.excelbanter.com/excel-worksheet-functions/433387-vba-delete.html)

s[_5_]

vba delete
 
Hello,
I want to write a vba that find row and delete it. I confirmed that
the match function returns some number OK, but delete function has
'13'runtime error-.
Could someone help me?
Thank you.
David

delrow = Application.WorksheetFunction.Match(partnumber &
Invoicenumber, Range("d:d"), 0)
Rows("delrow:delrow").Delete

Jim Cone[_2_]

vba delete
 
Dim delrow As Long

delrow = 5
Rows(delrow).Delete
--
Jim Cone
Portland, Oregon USA
http://www.contextures.com/excel-sort-addin.html
Editorial review of Special Sort Excel add-in (30 ways to sort)




"s"
wrote in message
...
Hello,
I want to write a vba that find row and delete it. I confirmed that
the match function returns some number OK, but delete function has
'13'runtime error-.
Could someone help me?
Thank you.
David

delrow = Application.WorksheetFunction.Match(partnumber &
Invoicenumber, Range("d:d"), 0)
Rows("delrow:delrow").Delete




s[_5_]

vba delete
 
On Mar 6, 9:55*am, "Jim Cone" wrote:
Dim delrow As Long

delrow = 5
Rows(delrow).Delete
--
Jim Cone
Portland, Oregon USAhttp://www.contextures.com/excel-sort-addin.html
Editorial review of Special Sort Excel add-in (30 ways to sort)

"s"
wrote in ...



Hello,
I want to write a vba that find row and delete it. I confirmed that
the match function returns some number OK, but delete function has
'13'runtime error-.
Could someone help me?
Thank you.
David


delrow = Application.WorksheetFunction.Match(partnumber &
Invoicenumber, Range("d:d"), 0)
Rows("delrow:delrow").Delete


Thank you so much Jim.
You are my time saver.
David


All times are GMT +1. The time now is 12:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com