RE: Using New VBA code
- From: Luke M <LukeM@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 10 Dec 2008 11:19:02 -0800
You have some extra spaces before the command 'entire row.delete'. Should be:
Selection.EntireRow.SpecialCells(xlBlanks).EntireRow.Delete
--
Best Regards,
Luke M
*Remember to click "yes" if this post helped you!*
"Kris" wrote:
I am trying to set up a macro to delete rows if some of the columns in the.
row do not contain data.
here is the code that I am using:
Sub DeleteBlankRows2()
'Deletes the entire row within the selection if _
some of the cells WITHIN THE SELECTION contain no data.
On Error Resume Next
Selection.EntireRow.SpecialCells(xlBlanks) . EntireRow.Delete
On Error GoTo 0
End Sub
The columns have pick lists build in some, but if I leave the pick list
blank I want it to delete the entire row. When I run the macro I get a
Syntax Error that says something is not set up right.
Can anyone help me?
- Follow-Ups:
- Re: Using New VBA code
- From: Ron de Bruin
- Re: Using New VBA code
- References:
- Using New VBA code
- From: Kris
- Using New VBA code
- Prev by Date: Re: Formula to find the last number in a series
- Next by Date: Re: Convert TimeStamp to Minutes
- Previous by thread: Using New VBA code
- Next by thread: Re: Using New VBA code
- Index(es):
Relevant Pages
|
Loading