How to use IsNull in vb.net?

时间:2016-04-07 10:30:13

标签: vb.net vb.net-2010

Following code is okey in vba;

Sub Macro1()

Columns("A:A").NumberFormat = "General"

Range("A7").NumberFormat = "m/d/yyyy"

If IsNull(Columns("A:A").NumberFormat) = True Then
    MsgBox "Column A format is not General"
End If

End Sub

I am trying to convert above code to vb.net code.

1 个答案:

答案 0 :(得分:0)

try this

 If IsNothing(Columns("A:A").NumberFormat) Then
      MessageBox.Show("Column A format is not General")
 End If