954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Deleting Rows in excel

hello all
i m using VB 6 for automating excel. My data contains some blank rows, which i need to get rid of. can anyone tell me how to do it.
help wud be appreciated.
thanks.

Robert06
Newbie Poster
2 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 

If you know the row, you can use objectreference.EntireRow.Delete (objectreference is a reference to a range, I think). Or something like: xlApp.ActiveSheet.Range("2:10").Rows.Delete, might work for you. First you'll need to loop through and make sure the row in question is in fact blank, and then just run a delete on it. This reference might be of some help: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaxl11/html/xlmthDelete1_HV03076813.asp

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

thanks for the reply.. the problem is i dont know which rows are blank. but i m sure that there are many blank rows in the data.
looking forward to suggestions and helps.
thanks.

Robert06
Newbie Poster
2 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You