Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I want to create a new control without any reference to an exisiting control on a form

Posted on 2004-10-21
4
Medium Priority
?
219 Views
Last Modified: 2010-05-02
Hello,
       Is it possible to create an inet control inside a class with out using a form a or control placed on the form.
For instance I don't want

Set myTextBox = new form1.textbox1

I want to create a new control without any reference to an exisiting control on a form.

Thanks

0
Comment
Question by:Arundel_Castle
[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
4 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 1600 total points
ID: 12370903
0
 
LVL 17

Assisted Solution

by:inthedark
inthedark earned 200 total points
ID: 12371609
Yes..

1) In the project where your class is create a dummy form with an Inet ontrol on it.

2) In the class decs you need code like this:

Dim MyfrmDummy As FrmDummy
Dim WithEvents INET1 As INet

3) In the class initiaize you need code like this:

Set myfrmDummy = New frmDummy ' note the use of the New keyword
Set INET = frmDummy.INet1

The INet in your class will now receive all events etc.

When closing the class just:
Set INet = Nothing
Set MyFrmDummy = Nothing

Hope this helps:~)
0
 
LVL 17

Assisted Solution

by:zzzzzooc
zzzzzooc earned 200 total points
ID: 12379533
If you don't need to know the interface (for WithEvents) and don't mind late-binding:

    Dim objInet As Object
    Set objInet = CreateObject("InetCtls.Inet.1")
    Call MsgBox(objInet.OpenURL("www.yahoo.com"))
0
 
LVL 3

Author Comment

by:Arundel_Castle
ID: 12404384
Thanks for the help guys.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

609 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