
06-14-2009, 09:53 PM
|
 |
Centurion
|
|
Join Date: Sep 2005
Posts: 176
|
|
Hi, Frankie80,
sorry, I donīt see the reason for the error (works fine in my example) - what about the use of a modified code:
Code:
Sub DeleteEmptyCells2()
Const cstrSheet As String = "All Days"
Const clngColumn As Long = "9"
On Error Resume Next
Worksheets(cstrSheet).UsedRange.Columns(clngColumn).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
If Err <> 0 Then
MsgBox "Error: " & Err.Number & vbCrLf & "Desprition: " & Err.Description
End If
End Sub
If the error still shows up could you please show all the code used in the module and indicate where it is located as maybe the error occurs from putting the code segment outside of a procedure or function?
Ciao,
Holger
|
|