Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

User-defined type not defined

Posted on 1999-07-01
6
Medium Priority
?
362 Views
Last Modified: 2012-08-14
I have some code I got from an internet site and keep getting the error "USER-DEFINED TYPE NOT DEFINED" when I run it on the INET1 variable.  Why and how do I fix it?  The code is listed below:

Option Explicit

Dim inet1 As New inetctlsobjects.inet
Dim FTPHostname As String
Dim Response As String

Public Sub writefile(pathname As String, filename As String, IPaddress As String)
    FTPLogin
    FTPHostname = IPaddress
    inet1.Execute FTPHostname, "PUT " & pathname & filename & " /" & filename
   
    Do While inet1.StillExecuting
        DoEvents
        Loop
        Exit Sub
    End Sub
Public Sub getfile(pathname As String, filename As String, IPaddress As String)
    FTPLogin
    FTPHostname = IPaddress
    inet1.Execute FTPHostname, "GET " & filename & " " & pathname & filename
    Do While inet1.StillExecuting
        DoEvents
        Loop
        Exit Sub
    End Sub

Private Sub FTPLogin()
    With inet1
        .password = "Pass"
        .UserName = "Anonymous"
    End With
End Sub

0
Comment
Question by:rrh0561
[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
  • 2
6 Comments
 
LVL 3

Expert Comment

by:Iexpert
ID: 1521335
You need to add a reference to the internet controls.
This is done using .the references item on the project menu
0
 

Author Comment

by:rrh0561
ID: 1521336
That didn't work.
0
 
LVL 1

Expert Comment

by:apratima
ID: 1521337
Whatever IExpert told is right.
Do you know which .dll file you have to refer in order to use inetctlsobjects class?
Go to Project >> References and find out whether associated dll file name is checked.
This error is due to this only.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:rrh0561
ID: 1521338
No I do not know which .dll refers to inetctlsobjects.  I got this from the net and being a beginner I don't know a lot.
0
 

Author Comment

by:rrh0561
ID: 1521339
Thank you, I figured it out.  lexpert gets the points.
0
 
LVL 3

Accepted Solution

by:
Iexpert earned 200 total points
ID: 1521340
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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

715 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