Solved

VBA to Check if Range is Set?

Posted on 2013-05-23
2
470 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
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 14

Author Comment

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

Featured Post

A Knowledge Base That Stays Up-to-Date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
This article will show you how to use shortcut menus in the Access run-time environment.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now