PDA

View Full Version : جستجو در حروف



talent1
دوشنبه 09 دی 1392, 12:04 عصر
بخوام یه چیز اینجوری بدست بیارم باید چی کار کنم
114603
یعنی اولی و دومی روبدم جواب بشه سومی

hmbarnamenevis
سه شنبه 10 دی 1392, 21:22 عصر
Dim Result As String
Dim boolAdd As Boolean
For i = 1 To Len(Text1.Text)
boolAdd = True
Dim temp, temp2 As String
temp = Mid(Text1.Text, i, 1)
For j = 1 To Len(Text2.Text)
temp2 = Mid(Text2.Text, j, 1)
If temp = temp2 Then
boolAdd = False
End If
Next j
If (boolAdd) Then
Result = Result + temp
End If
Next i
Text3.Text = Result

آموزش برنامه نویسی از پایه و ریشه: http://MyProgrammingVB.blogsky.com

vbhamed
چهارشنبه 11 دی 1392, 00:14 صبح
سلام
اينم راه ساده تر
Dim s$, i%
s = Text1
For i = 1 To Len(Text2)
s = Replace(s, Mid$(Text2, i, 1), "")
Next
Text3 = s