Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Checking for a void

Checking for a void

Scheduled Pinned Locked Moved Visual Basic
questioncsharp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MatthysDT
    wrote on last edited by
    #1

    How can I check for a NULL/NOTHING/VOID in VB .NET? If I recall correctly in VB6 it was ISNULL(Variable,Var if NULL) and i think in VBA it was NZ(Variable,Var if NULL) Can't find the .Net equivalent. Thanks

    C A N 3 Replies Last reply
    0
    • M MatthysDT

      How can I check for a NULL/NOTHING/VOID in VB .NET? If I recall correctly in VB6 it was ISNULL(Variable,Var if NULL) and i think in VBA it was NZ(Variable,Var if NULL) Can't find the .Net equivalent. Thanks

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      If someVariable Is Nothing Then
      ' Your code here
      End If


      My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

      1 Reply Last reply
      0
      • M MatthysDT

        How can I check for a NULL/NOTHING/VOID in VB .NET? If I recall correctly in VB6 it was ISNULL(Variable,Var if NULL) and i think in VBA it was NZ(Variable,Var if NULL) Can't find the .Net equivalent. Thanks

        A Offline
        A Offline
        aseef
        wrote on last edited by
        #3

        i.e isdbnull Asif

        1 Reply Last reply
        0
        • M MatthysDT

          How can I check for a NULL/NOTHING/VOID in VB .NET? If I recall correctly in VB6 it was ISNULL(Variable,Var if NULL) and i think in VBA it was NZ(Variable,Var if NULL) Can't find the .Net equivalent. Thanks

          N Offline
          N Offline
          namazikhah
          wrote on last edited by
          #4

          Hi I think you can use expression vbNull! something like this: If you have a function like: Private Function LoadData() As DataReader So your code can be like this: If LoadData = vbNull Then . . . End IfYou can find more about it on MSDN(search for VisualBasic Namespace). Hope it can help Have a nice programming day

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups