
04-07-2014, 09:58 AM
|
 |
Google Hound
Retired Moderator * Guru *
|
|
Join Date: Nov 2001
Location: Arizona, USA
Posts: 12,400
|
|
You haven't instantiated the control.
Either declare as a new instance of the Inet control, or Set it to a new instance after instantiating it. i.e.
Code:
Dim Inet1 as NEW Inet ' (my underlining) , OR
Code:
Dim Inet1 as Inet
Set iNet1 = New Inet
' Your Code goes here
Set Inet1 = Nothing
Form A is simpler, and the control is automatically released when it goes out of scope, but form B can be faster under some conditions. In your case, since you are using the 'With' construct, the performance increase would be miniscule (a single conditional if/then/else would be generated in the object code, outside a loop, to check that the object is a valid one.)
|
__________________
Lou
"I have my standards. They may be low, but I have them!" ~ Bette Middler
"It's a book about a Spanish guy called Manual. You should read it." ~ Dilbert
"To understand recursion, you must first understand recursion." ~ unknown
Last edited by loquin; 04-07-2014 at 10:05 AM.
|