Solved

VBA to Check if Range is Set?

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
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.

738 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