|
-
Sep 20th, 2002, 07:55 AM
#1
Thread Starter
Junior Member
MID function
What is the MID function?
-
Sep 20th, 2002, 08:00 AM
#2
Addicted Member
I don't mean to be evasive or unhelpful - but have a look at msdn's docs for MID. If you still have trouble then I'm sure we'd be pleased to help.
HD
-
Sep 20th, 2002, 08:01 AM
#3
Frenzied Member
Mid allows you to take a portion of a string starting at certain position for specified length.
-
Sep 20th, 2002, 08:04 AM
#4
Frenzied Member
Maybe you can do a search on MID
I would answer , but try to use the forum to the max.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
-
Sep 20th, 2002, 08:10 AM
#5
Thread Starter
Junior Member
Sorry about that... I have a project for a class to create a robot game using the MID function, and a friend of mine asked about it on here, and everyone kept telling her not to use MID because there were better ways to do it. It's part of the assignment. *fustration*. I probably should have asked in that string. Sorry.
-
Sep 20th, 2002, 08:33 AM
#6
Frenzied Member
This you can do with the Mid function
VB Code:
' you can use the mid function to change a existing string
Dim MyString
MyString = "The dog jumps" ' Initialize string.
Mid(MyString, 5, 3) = "fox" ' MyString = "The fox jumps".
Mid(MyString, 5) = "cow" ' MyString = "The cow jumps".
Mid(MyString, 5) = "cow jumped over" ' MyString = "The cow jumpe".
Mid(MyString, 5, 3) = "duck" ' MyString = "The duc jumpe".
' or to substract something out of a string
MyString = "The dog jumps" ' Initialize string.
MsgBox "Who " & Mid$(MyString, 9) & " " & Mid$(MyString, 1, 8) & "?"
Place the code in a event and check on the value of MyString
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
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
|