[AccessD] vbNull = 1

Charlotte Foust cfoust at infostatsystems.com
Wed Jan 21 12:51:02 CST 2004


I'd say he *was* abusing VB constants.  I can't imagine why he would use
vbNull in the hWnd argument, but I suppose it's because he's written a
public sub and is passing the name of the program to be opened into the
routine.  I have no idea what passing an hWnd of 1 would do with the
message boxes generated, but I have seen 1 passed explicitly in that
argument before.

Charlotte Foust

-----Original Message-----
From: Gustav Brock [mailto:gustav at cactus.dk] 
Sent: Wednesday, January 21, 2004 10:01 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] vbNull = 1


Hi Mark and Charlotte

Thanks!
I had forgotten vbNull is related to VarType() ... that explains.

Then I guess this guy is slightly off track abusing our constants but he
managed to confuse me:

  http://www.imt.net/~joe/matt/program/vb/HOWTOs/ShellExecuteAPI/

/gustav


> Gustav,

> There is a very short discussion of "When is Nothing something?" here:

> http://www.vbdesign.net/expresso/archive/topic/3244.html

> Mark

> vbNull

> This one is great for testing for Null in a variable (database users 
> take
> note) using VarType:

> If VarType (varVariable) = vbNull Then

> again, don't use this constant to try to assign a Null value, because 
> its not nothing.. True value of vbNull is 1 (in a string variable "1")
> ************

> Why does the VB constant vbNull equal 1 and not 0 (zero)?

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list