VB6 SP6 BUG Using NOT keyword??!!!
From: B. Nichols (bnichols_at_herff-jones.com)
Date: 05/17/04
- Next message: Bob Butler: "Re: VB6 SP6 BUG Using NOT keyword??!!!"
- Previous message: Michael D. Ober: "Re: String Variable Changing by Itself...BUG???"
- Next in thread: Bob Butler: "Re: VB6 SP6 BUG Using NOT keyword??!!!"
- Reply: Bob Butler: "Re: VB6 SP6 BUG Using NOT keyword??!!!"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 May 2004 13:51:07 -0700
Like some, I too have to maintain VB6 applications even though our company has gone .NET for new development. Having that said, I am having a very unusual problem with VB6 that didn't show up until I installed SP 6. I don't know if it's specific to my machine or not (since I am the only one with SP6 intalled), but thought I would post it here none the less. The problem lies in using the NOT keyword in an IF... END IF block.
I have a function (which returns a Boolean) call that checks for an existing Internet connection, and executes a block of code if the connection does not exist, as such:
IF Not CheckInternet Then
<DO THIS>
Else
<DO THAT>
End If
Whenever the CheckInternet function returns TRUE, the <DO THIS> condition executes anyway. I've even put the return into a boolean variable to see if it was somehow a function call problem:
Dim bResult As Boolean
bResult = CheckInternet
If Not bResult Then
<DO THIS>
Else
<DO THAT>
End If
Again... the <DO THIS> condition still executed when bResult was TRUE. The next thing I did was take out the NOT keyword and set the statement as so:
If CheckInternet = False Then
<DO THIS>
Else
<DO THAT>
End If
This time the condition executed correctly, doing the <DO THAT> block... Did SP6 somehow change the NOT keyword?? Let me know if anyone else is seeing this odd problem.
Brian Nichols
Herff Jones, Inc.
- Next message: Bob Butler: "Re: VB6 SP6 BUG Using NOT keyword??!!!"
- Previous message: Michael D. Ober: "Re: String Variable Changing by Itself...BUG???"
- Next in thread: Bob Butler: "Re: VB6 SP6 BUG Using NOT keyword??!!!"
- Reply: Bob Butler: "Re: VB6 SP6 BUG Using NOT keyword??!!!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|