[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

User-defined type not defined VB6

Posted on 2004-04-02
3
Medium Priority
?
3,587 Views
Last Modified: 2009-07-29
This is an example from Microsoft.
Put al the code in form, added the components mshtml.dll and shdocvw.dll.
Get the following error while trying to run the code.

User-defined type not defined

Dim Sws As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer

Private Sub Form_Load()
   Dim Doc
   List1.Clear
   List2.Clear

   Text1.Text = Sws.Count

   For Each IE In Sws
      List1.AddItem IE.LocationName

      Set Doc = IE.Document
      If TypeOf Doc Is HTMLDocument Then
         'if this is an HTML page, display the title
         'may or may not be the same as LocationName
         List2.AddItem Doc.Title
      End If
   Next
End Sub
0
Comment
Question by:Renebo
[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
3 Comments
 
LVL 19

Expert Comment

by:Shauli
ID: 10745239
Replace these line:
Dim Sws As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer

With these lines:
Dim Sws As New SHDocVwCtl.ShellWindows
Dim IE As SHDocVwCtl.InternetExplorer

S

0
 
LVL 39

Expert Comment

by:appari
ID: 10745263
on which line are you getting the error?
its running fine on my m/c
0
 
LVL 28

Accepted Solution

by:
Ark earned 1000 total points
ID: 10746590
Hi
VB Menu->Project->References-> Check Microsoft Internet Contols and Microsoft HTML Object Library
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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

649 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