Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Is Nothing    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
I'm Tired of Nothing
Jason Fleishman 
       
2 months ago
There appear to be 3 types of zero. Using the below global makes dealing with Nothing pleasant.
Public Function my0(ctl As Variant) As Boolean
    If IsObject(ctl) Then
        If ctl Is Nothing Then
            my0 = True
            Exit Function
        End If
    End If
    my0 = (Len(Trim("" & ctl)) = 0 Or Nz(ctl, 0) = 0)
End Function
Richard Rost  @Reply  
          
2 months ago
Very cool. I wrote a similar function years ago I called HasValue. It only checks for Null and empty strings though. I should revise it to deal with Nothing. Thanks for sharing!

DetailsPublic Function HasValue(X As Variant) As Boolean

    If IsNull(X) Then
        HasValue = False
    ElseIf Trim(X) = "" Then
        HasValue = False
    Else
        HasValue = True
    End If

End Function

Jason Fleishman OP  @Reply  
       
2 months ago
I sent the new 23-line version of 'my0' by email to you.
Thomas Gonder  @Reply  
      
35 days ago
From what I understand, only objects (not variables) contain a value of "Nothing". I keep the helper function partitioned based upon what they are looking at. It's bitten me in the past to not do so.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Is Nothing.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/8/2026 8:24:27 PM. PLT: 0s