southpaw163
New Member
- Joined
- Aug 28, 2006
- Messages
- 4
I have macro set up to delete selected row right now being:
Sub deleteactiverow()
Application.ScreenUpdating = False
ActiveSheet.Unprotect
ActiveCell.EntireRow.delete
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
But I don't want it to delete the entire row, I only want it to delete columns A-M. Is there a way I can do this? I want it to somehow select columns A-M on the current row and just delete them. But since the number of the current row could change I don't know what code to put in there. Can anyone help me out here? So far everyone has answered all of my questions with ease so I'm hoping that keeps up!
Sub deleteactiverow()
Application.ScreenUpdating = False
ActiveSheet.Unprotect
ActiveCell.EntireRow.delete
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
But I don't want it to delete the entire row, I only want it to delete columns A-M. Is there a way I can do this? I want it to somehow select columns A-M on the current row and just delete them. But since the number of the current row could change I don't know what code to put in there. Can anyone help me out here? So far everyone has answered all of my questions with ease so I'm hoping that keeps up!