Assingment of NULL

C

clara

Hi all,

Is it possible to assign special null to a var in VBE.

clara
thank you so much for your help
 
A

Allen Browne

In VBA, you can assign Null only to a variable of type Variant.

This example is find:
Dim var1 As Variant
var1 = Null

This example won't work:
Dim str1 As String
str1 = Null ' <= Error!!!
 
Top