Solved

VBA to Check if Range is Set?

Posted on 2013-05-23
2
492 Views
Last Modified: 2013-05-23
Hi All,

I thought this would be simple... ya, I think that a lot!
If rng = Nothing Then
Debug.Print "No-thing"
Else
Debug.Print "A-thing"
End If

Open in new window


I just want know if the range = Nothing. When I hover over the range it says rng = Nothing but I don't know how to get this information via VBA.

Thanks in advance!
0
Comment
Question by:DrTribos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 400 total points
ID: 39190190
I thought"that looks like one of Steve's"

Dim rng As Range

If rng Is Nothing Then
Debug.Print "No-thing"
Else
Debug.Print "A-thing"
End If

Open in new window

0
 
LVL 15

Author Comment

by:DrTribos
ID: 39190198
Doh! it's an IS?  wow!
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question