Deleting active cell row in Excel through VB

Microsoft Office excel 2007 - upgrade
January 14, 2011 at 13:17:13
Specs: Windows XP
Hi,

I am trying to delete the active cell row through a vb command if it is higher than 12.

I have used the below codes but it does not work.

Any input would be greatly appreciated.

Thanks,
henri


See More: Deleting active cell row in Excel through VB

Report •

#1
January 14, 2011 at 13:18:24
Forgot the coding:

If ActiveCell.Row >= 13 Then

ActiveCell.EntireRow.Delete

Else
MsgBox "Action not allowed. Please select a row higher than 12."
End If


Report •

#2
January 14, 2011 at 13:19:59
if it is higher than 12
Define "it."

How To Ask Questions The Smart Way


Report •

#3
January 14, 2011 at 15:30:30
It actually worked without changes after I closed the spreadsheet and reopened it.

Thanks for the very quick reply.

Regards,
Henri


Report •
Related Solutions


Ask Question