Natsha
New Member
- Joined
- May 20, 2021
- Messages
- 44
- Office Version
- 365
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
- Platform
- Windows
I need an condition where if I want to remove value ;1-1, only that value should remove not ;1-1 in ;1-17, like wise I have many scenerio with different values...
Macro working fine...I have this bug which makes to not implementing this on my project.
Any help?
Code:
Sub Remove()
Dim answer As VbMsgBoxResult
answer = MsgBox("Are you sure you want to run the Macro?", vbYesNo, "Run Macro")
If answer = vbYes Then
Dim c As Range
svar = Application.InputBox("Insert keyword:", Title, Type:=2)
If svar = False Or svar = "" Then Exit Sub 'if user cancel
Selection.Replace What:=svar, Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
MsgBox "Task completed"
End If
End Sub
Also posted here
Macro working fine...I have this bug which makes to not implementing this on my project.
Any help?
Code:
Sub Remove()
Dim answer As VbMsgBoxResult
answer = MsgBox("Are you sure you want to run the Macro?", vbYesNo, "Run Macro")
If answer = vbYes Then
Dim c As Range
svar = Application.InputBox("Insert keyword:", Title, Type:=2)
If svar = False Or svar = "" Then Exit Sub 'if user cancel
Selection.Replace What:=svar, Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
MsgBox "Task completed"
End If
End Sub
Also posted here