Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

Delete Blank Rows - specify column via dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
porter444 - 30 Nov 2007 16:19 GMT
From time to time I have worksheets of data that have rows I want to
eliminate.  The rows I want to delete usually have something in common like,
all have a blank value in a specific column.  

In the past I have just modified a macro to specify which column I want to
deal with.  Like this for column B:
   Columns(2).SpecialCells(xlCellTypeBlanks).EntireRow.Delete

Wondering if there is a way to write a macro that when run would give me a
dialog box and ask which column to look in so I don't have to change the
macro for the different situations.

Logically, something like this:

Columns(DIALOG BOX ENTRY).SpecialCells(xlCellTypeBlanks).EntireRow.Delete

Can you help?

Thanks in advance,

Scott
Ron de Bruin - 30 Nov 2007 16:45 GMT
Why not use the column of the active cell ?
Columns(ActiveCell.Column)

See also this page for a possible problem
http://www.rondebruin.nl/specialcells.htm

Signature

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

> From time to time I have worksheets of data that have rows I want to
> eliminate.  The rows I want to delete usually have something in common like,
[quoted text clipped - 17 lines]
>
> Scott
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.