- Home
·
- String Manipulation
·
- RemoveLiteralsAddIns remove literals from Strings. Create AddIns which can remove literals from the
RemoveLiteralsAddIns remove literals from Strings. Create AddIns which can remove literals from the
RemoveLiteralsAddIns remove literals from Strings. Create AddIns which can remove literals from the strings.
API Declarations
'Select AddIns Project
'The program will remove ":" and "-" from the Strings
'You can write it for any other literals.
Public VBInstance as BVIDE.VBE
Public Connect as Connect
Option Explicit
Rate RemoveLiteralsAddIns remove literals from Strings. Create AddIns which can remove literals from the
(1(1 Vote))
'Add two Labels controls over the frmAddIN form
'Change the Caption of Label controls as
'StringWithLiterals and StringWithoutLiterals
'Add two text box controls over the frmAddIn form
'Change the name of the textbox control as
'txtStringWithLiterals and txtStringWithoutLiterals
'Put a command button over the frmAddIn form
'Set the name and caption of command button as
'cmdRemoveLiterals and RemoveLiterals
'Type the code given below in code module.
Private Sub CancelButton_Click()
Connect.Hide
End Sub
Private Sub cmdRemoveLiterals_Click()
Dim StringWithoutLiterals as String
StringWithoutLiterals=RemoveLiterals(txtStringWithLiterals.text)
txtStringWithoutLiterals.Text=StringWithoutLiterals
End Sub
Public Function RemoveLiterals(strLiteral as String) As String
Dim tempStr as String,finalStr as String
tempStr=Mid$(strLiteral,1,1)
Dim ctr as Integer
Do While tempStr <> ""
ctr=ctr+1
tempStr=Mid$(strLiteral,ctr,1)
If tempStr<>":" And tempStr<>"-" then
finalStr=finalStr+tempStr
End If
Loop
RemoveLiterals=finalStr
End Function
RemoveLiteralsAddIns remove literals from Strings. Create AddIns which can remove literals from the Comments
No comments yet — be the first to post one!
Post a Comment