Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Why is Not not Not?

As far as I can tell, both your "IFs" say the same thing. In your first "IF"
you have your code to execute in the "else" portion of the statement which is
like saying "Not".

HTH

"Paul Lautman" wrote:

I've was having terrible trouble trying to figure out why I couldn't get
some OLE code to work with the IBM Personal Communications Emulator.

A lot of tracing through and I found that Not wasn't working.

In the code in the attached picture, if I un-comment the line "ir = True"
then everything works fine. But as it stands (and as the picture shows),
both ir and Not ir are both True!!!

If I code:

If oia.waitforinputready(10000) Then
Else
msg = "Initialisation (check Call Entry)"
GoTo toolong
End If

Then all works as expected. But if I code:

If Not oia.waitforinputready(10000) Then
msg = "Initialisation (check Call Entry)"
GoTo toolong
End If

Then the "True" leg is always executed???

Anybody got any ideas?

Just in case anyone doesn't get the attachment, I have placed it at

http://tinyurl.com/bhx57



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Why is Not not Not?

I KNOW that they say the same thing!!! That is my point!!!

Whilst they both say the same thing, they do not behave the same!

quartz wrote:
As far as I can tell, both your "IFs" say the same thing. In your
first "IF" you have your code to execute in the "else" portion of the
statement which is like saying "Not".

HTH

"Paul Lautman" wrote:

I've was having terrible trouble trying to figure out why I couldn't
get some OLE code to work with the IBM Personal Communications
Emulator.

A lot of tracing through and I found that Not wasn't working.

In the code in the attached picture, if I un-comment the line "ir =
True" then everything works fine. But as it stands (and as the
picture shows), both ir and Not ir are both True!!!

If I code:

If oia.waitforinputready(10000) Then
Else
msg = "Initialisation (check Call Entry)"
GoTo toolong
End If

Then all works as expected. But if I code:

If Not oia.waitforinputready(10000) Then
msg = "Initialisation (check Call Entry)"
GoTo toolong
End If

Then the "True" leg is always executed???

Anybody got any ideas?

Just in case anyone doesn't get the attachment, I have placed it at

http://tinyurl.com/bhx57




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Why is Not not Not?

What is the return type for waitforinputready() ? Is it a boolean, or
something else?

Tim.

"Paul Lautman" wrote in message
...
I KNOW that they say the same thing!!! That is my point!!!

Whilst they both say the same thing, they do not behave the same!

quartz wrote:
As far as I can tell, both your "IFs" say the same thing. In your
first "IF" you have your code to execute in the "else" portion of
the
statement which is like saying "Not".

HTH

"Paul Lautman" wrote:

I've was having terrible trouble trying to figure out why I
couldn't
get some OLE code to work with the IBM Personal Communications
Emulator.

A lot of tracing through and I found that Not wasn't working.

In the code in the attached picture, if I un-comment the line "ir
=
True" then everything works fine. But as it stands (and as the
picture shows), both ir and Not ir are both True!!!

If I code:

If oia.waitforinputready(10000) Then
Else
msg = "Initialisation (check Call Entry)"
GoTo toolong
End If

Then all works as expected. But if I code:

If Not oia.waitforinputready(10000) Then
msg = "Initialisation (check Call Entry)"
GoTo toolong
End If

Then the "True" leg is always executed???

Anybody got any ideas?

Just in case anyone doesn't get the attachment, I have placed it
at

http://tinyurl.com/bhx57






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"