Discussion Locked

setting object variable

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i am using an active x dll...
i 've added an inet control in the toolbox
now, i want to make an object of it and use it (by coding only)..
by declaring:
public a as inet

then making a public sub saying:
set x as project.class
x.a.setAccessType = icDirect

and calling this from an standard exe gives the error:

'object variable or width block not set'

how to set object variable here? (for inet control)
please help me out....
thanx in advance...

5 replies

by andrew

Your syntax is off by a bit. Try this:

Private WithEvents oInet As InetCtlsObjects.Inet

Set oInet = CreateObject("InetCtlsObjects.Inet")

by andrew

If you're not going to use the Inet control on a form, you can set a reference to it instead of adding it to the toolbox.

Open the Project|References dialog and click on Browse. Change the file type to OCX and locate C:\WINNT\system32\Msinet.ocx.

This discussion is closed to new replies.