[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 57
  • Last Modified:

How do I check if a control variable has something assigned?

Hi Experts,

I have a sub that expects two optional variables, a control and a label.
How do I check if they contain something?

See attached.
untitled.png
0
bfuchs
Asked:
bfuchs
  • 2
  • 2
3 Solutions
 
Ryan ChongCommented:
try check
If cNtrl Is Nothing Then

Open in new window

and
If lBl Is Nothing Then

Open in new window

0
 
bfuchsAuthor Commented:
Hi,

That worked, however got attached error in following line

Thanks,
Ben
untitled.png
0
 
Rey Obrero (Capricorn1)Commented:
change
cNtrl=screen.activecontrol

with
set cNtrl=screen.activecontrol
0
 
Ryan ChongCommented:
try add Set in front of that statement?

Set object = Someotherobject
0
 
bfuchsAuthor Commented:
Thank you experts!
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now