Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
when I use sValue = 12345 result = 11; 22
when I use sValue = 11 result = 12345; 22
How to remove character ";" ? Sometimes the character is on the left and sometimes on the right.
How to get the right result?
iProperties.Value("Custom", "A") = "12345; 11; 22"
'create a String type variable to hold the value of the first iProperty Dim oA As String oA = iProperties.Value("Custom", "A") 'check to make sure it now contains a value other than "" If oA = "" Then MsgBox("The 'Plant Listing' iProperty was empty.", vbExclamation, "Empty iProperty") Exit Sub End If Dim sValue As String sValue = "12345" 'sValue = "11" If (iProperties.Value("Custom", "A").Contains(sValue)) Then ' MessageBox.Show("Bingo! " & sValue & " is in the list.", "iLogic") s1 = Replace(iProperties.Value("Custom", "A"), sValue, "") MessageBox.Show(s1, "Title") Else MessageBox.Show("Sorry, " & sValue & " is NOT in the list.", "iLogic") End If
Solved! Go to Solution.