We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,668 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

searching for a specific character in a string(vb6)

hi.
would someone minf giving me a snippet of a code where a program searches for a specific character in a string?
for example. if i have a label that contains a string "abcd" the program would check if the characters "b" and "d" exist in the string regardless of from what position it is found, as long as those letters are present in the string.

thankyou so much for the help. :)

2
Contributors
1
Reply
5 Hours
Discussion Span
1 Year Ago
Last Updated
2
Views
Question
Answered
yeeitsneo
Light Poster
37 posts since Sep 2011
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

check out the instr function eg

if instr(1, stringToSearch, "b") > 0 or instr(1, stringToSearch, "d")> 0 then
   msgbox "found"
end if
ChrisPadgham
Posting Pro in Training
451 posts since Sep 2009
Reputation Points: 127
Solved Threads: 88
Skill Endorsements: 5
Question Answered as of 1 Year Ago by ChrisPadgham

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0591 seconds using 2.67MB