|
-
Oct 11th, 2003, 11:26 PM
#1
Thread Starter
Hyperactive Member
If text line starts with # then...
I have a RichTextBox and a Drop Down List, if the users types something like:
#hello
then it add the # and everything after the # into the drop down list, and then if they select one that has been added to the drop down list, then it will goto the line that has the string that they selected from the dropdownlist.
well... i think that made sense...
any suggestions?
-
Oct 12th, 2003, 02:11 AM
#2
VB Code:
if Left(strString,1) = "#" Then
Msgbox "strString starts with #"
end If
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Oct 12th, 2003, 05:49 PM
#3
Thread Starter
Hyperactive Member
that doesn't work...
i dont get an error or anything, it jsut doesn't do anything
i have
VB Code:
Private Sub RTB_change()
Dim strString As String
If Left(strString, 1) = "#" Then
MsgBox "strString starts with #"
End If
End Sub
Last edited by Narfy; Oct 12th, 2003 at 06:28 PM.
-
Oct 12th, 2003, 06:33 PM
#4
Of course it doesn't work, you haven't set strString to anything (ie, strString = "", more or less); You have to replace strString with whatever you want to test. All he was doing was offering an example of how to test if a string starts with "#".
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Oct 12th, 2003, 06:35 PM
#5
Thread Starter
Hyperactive Member
lol, im stupid (like always)
thanks
-
Oct 12th, 2003, 06:36 PM
#6
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|