|
-
Nov 9th, 2007, 04:13 PM
#1
Thread Starter
Junior Member
Use of GETCHAR function
I do not find the getchar function in my VB for applications?.
How do I install it?, or what do I need to activate it?
Thank in advance!!!!
Yorch.
-
Nov 9th, 2007, 04:26 PM
#2
Re: Use of GETCHAR function
i think that is a c function, try Chr function in vb, i may have misinterpereted want you want to return, but that looks right
? chr(97)
a
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Nov 9th, 2007, 04:40 PM
#3
Thread Starter
Junior Member
Re: Use of GETCHAR function
Thanks, actually I want to get a character from a string. I found this in the msdn:
Code:
Visual Basic
Dim TestString As String = "ABCDE"
Dim TestChar As Char
TestChar = GetChar(TestString, 4)
' Returns "D"
The GetChar function does not work in my version. Do I need to activate something else?.
-
Nov 9th, 2007, 04:47 PM
#4
Re: Use of GETCHAR function
vb Code:
Dim teststr As String, testchr As String
teststr = "ABCDE"
testchar = Mid(teststr, 4, 1)
'returns D
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
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
|