question about the code -
1. doesn't "Cstr" return a String data type ?
2. Isn't intVar2 an Integer ?
3. Are you assigning the String output of Cstr to intVar2 ?
4. do you have option strict off?
---what would happen if you removed "Cstr" from that last line of code ?
"Joe" <pr**************@gmail.com> wrote in message
news:fe*************************@posting.google.co m...
Hi,
When I get the length of a string I expect to get an integer back. I
getting back &H6 for both intVar1 and intVar2 from the following code:
Dim strVar As String
Dim intVar1 As Integer
Dim intVar2 As Integer
strVar = "foobar"
intVar1 = strVar.Length
intVar2 = CStr(Len(strVar))
Could someone PLEASE tell me what I'm doing wrong???
Thanks
- Joe
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.744 / Virus Database: 496 - Release Date: 8/24/2004