abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- Windows
hi, all
i have this code very well but to save time to delete more item using inputbox for instance i have items in col a contains (AA-123,bb-124,CC-1234..etc) so the code delete when i fill one item i would fill like this into input box AA-123 ,bb-124,CC-123 OR AA & BB & CC it supposes deleting them , moreover when i delete some items contain UCASE letters so i would showing message box if i fill LCASE letters so i make choice me the message box " it contains only UCASE letters , do you continue " if press ok then delete if no then ignore it and reverse
thanks
i have this code very well but to save time to delete more item using inputbox for instance i have items in col a contains (AA-123,bb-124,CC-1234..etc) so the code delete when i fill one item i would fill like this into input box AA-123 ,bb-124,CC-123 OR AA & BB & CC it supposes deleting them , moreover when i delete some items contain UCASE letters so i would showing message box if i fill LCASE letters so i make choice me the message box " it contains only UCASE letters , do you continue " if press ok then delete if no then ignore it and reverse
VBA Code:
Sub DeleteMyExcelRows()
Dim IDSelect As String
Dim c As Range
Let IDSelect = InputBox("Please Enter The Customer ID you want to delete")
If IDSelect = vbNullString Then Exit Sub
For Each c In Range("A:A")
If c = IDSelect Then c.EntireRow.Delete
Next
End Sub