Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It seems that your idea that "work arounds" are required stems from your
misunderstanding the VBA/VB language and what Null means. To me, outside of a database environment, it does not have a real meaning in VBA, where you have Nothing for objects and Empty for variants (although you can use Null with a Variant also) & vbNullString for strings. Private Sub CommandButton1_Click() Dim Nullable As Variant Nullable = "some string" Nullable = Null Debug.Print IsNull(Nullable) Nullable = "some string" Nullable = Empty Debug.Print IsNull(Nullable) Dim NullStr As String NullStr = "Null String" NullStr = vbNullString Debug.Print IsNull(NullStr) End Sub NickHK "vivmaha" wrote in message ... I'll try all of these work arounds. I'll only be able to test if they work when my application is 'semi-complete'. Why are all of these work arounds? Is there no such 'null' as there is in other languages? "vivmaha" wrote: Hi, I have the following code: Public parent As Node Set parent = New Node parent = Null This doesnt work (Error 438). The error is on the last line, where I try to assign a null value to parent. How do I assign null values to objects in VBA? Btw, "Node" is defined as a class module. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Failed to save table attributes of (null) into (null). | Excel Discussion (Misc queries) | |||
whats it do | Excel Discussion (Misc queries) | |||
Null, "null", vbNull, vbNullString, vbEmpty | Excel Programming | |||
I don't get it, Whats going on here? | Excel Programming | |||
Whats the equivalent for NETWORKDAYS in VBA for excel ? | Excel Programming |