Hi dear,
I have this code to delete data based on selection range:
Now, I want to add a condition to delete data so that users can only delete data in the specified area, eg. Range (A5:C100) and Range (F5:H50). Users are not permitted to delete data outside that range (event though it is intersect). Can anyone here help me? Thanks
I have this code to delete data based on selection range:
Code:
Sub DeleteSelection()
Dim myrange As Range
On Error Resume Next
Set myrange = Application.InputBox(Prompt:="Select your range:", Title:="Delete Data", Type:=8)
If Not myrange Is Nothing Then
myrange.ClearContents
End If
End Sub