+ Reply to Thread
Results 1 to 2 of 2

type definde by user not defined

  1. #1
    Registered User
    Join Date
    12-16-2008
    Location
    france
    Posts
    5

    type definde by user not defined

    Hi,
    several years ago a freelancer wrote for me several vba macros to login on a site , retrieve daily data and process them, which worked without any problem.
    recently I wished to clean my code , so I copied its totality in a new workbook ... and I got the following problem:
    "User-defined type not defined ..." on the line

    Dim pto As New genyBot

    pto is used in the code below :

    Private Sub btnLogin_Click()
    If (Not pto.IEexists) Then pto.CreateIE
    If (Not pto.StateLogin) Then
    Call buttonsOFF2
    'pto.AutoLogin = True
    pto.UserName = uname
    pto.Password = upass
    info ("Start login")

    If (Not pto.Login) Then
    MsgBox "Login failed"
    Call buttonsOn
    Else
    'Call buttonsOn ' xxxmodif
    'btnLogin.Enabled = False
    'btnLogout.Enabled = True
    'info ("Login OK")
    End If
    End If
    End Sub

    I made a thorough search of this genybot object but could not find it .
    Is there some hidden code in which this object is mentioned and that I would have forgotten in my code duplicate?
    Has anybody an idea?

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: type definde by user not defined

    Did you copy the class object and name it the same?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. User-defined type not defined when copying macro from one workbook to another
    By Mogles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2018, 08:08 AM
  2. [SOLVED] Compile error: User-defined type not defined
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-12-2017, 10:46 AM
  3. Replies: 4
    Last Post: 06-28-2016, 05:38 PM
  4. Replies: 2
    Last Post: 06-26-2016, 02:17 AM
  5. [SOLVED] User-defined type not defined on Copy to Clipboard Macro
    By vamosj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2015, 11:31 AM
  6. Compile error: user defined type not defined
    By duhigs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2014, 07:51 PM
  7. Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1