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!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top