|
-
Oct 6th, 2009, 10:18 AM
#1
Thread Starter
Lively Member
[RESOLVED] IsObject Function
Am currently cleaning up code in preparation for VB.Net Migration.
Am Adding Option Explicit to my VB6 code where missing and have come across a situation I need assistance in resolving.
Code:
If IsObject(SomeControl) then
Msgbox "Control Exists in this project"
else
Msgbox "Control does not exist in this project"
Endif
This code works properly to detect the existence of a control providing that I do not include Option Explicit in my code.
If I do use Option Explicit and SomeControl does not exist in project then I get Undefined Variable error on SomeControl.
How do I use IsObject to detect presence of object when OptionExplicit is ON?
Lee
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|