Deleting Rows in excel

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2006
Posts: 2
Reputation: Robert06 is an unknown quantity at this point 
Solved Threads: 0
Robert06 Robert06 is offline Offline
Newbie Poster

Deleting Rows in excel

 
0
  #1
Apr 2nd, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Deleting Rows in excel

 
0
  #2
Apr 2nd, 2006
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/de...HV03076813.asp
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 2
Reputation: Robert06 is an unknown quantity at this point 
Solved Threads: 0
Robert06 Robert06 is offline Offline
Newbie Poster

Re: Deleting Rows in excel

 
0
  #3
Apr 2nd, 2006
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 7340 | Replies: 2
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC