Results 1 to 12 of 12

Run-time error 424,object required in userform code

Threaded View

  1. #1
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Run-time error 424,object required in userform code

    Hello respected Gurus!

    I have a simple userform.that is placing the data on sheet1 .I am have a image control on my userform. I have the pictures in the same location where my workbook exists.I have named those pictures what I have in Column A through TextBox1.The code was working fine before I added the lines of code to load pictures.But with no luck I am getting "Run-time error '24' Object required.Clicking Debug the bold line of code is highlighted.The out put I want from this code is to load picture for the specific record and it should navigate with the next and previous button. In order to understand the situation more easily, I have attached a dummy project here


    Private Sub cmdNext_Click()
    CurrentRow = CurrentRow + 1
    Update_Form
    Dim NameFound As Range
    
    fPath = ThisWorkbook.Path & " \ "
    
    With Cells(CurrentRow, 1).Value
    Set NameFound = .Find(TextBox1.Text)
    With NameFound
    On Error Resume Next
    ImgData.Picture = LoadPicture(fPath & “nopic.jpg”)
    ImgData.Picture = LoadPicture(fPath & TextBox1.Text & ".jpg")
    End With
    End With
    TextBox1.Value = Cells(CurrentRow, 1).Value
        TextBox2.Value = Cells(CurrentRow, 2).Value
            TextBox3.Value = Cells(CurrentRow, 3).Value
    End Sub
    Best Regards
    Imran Bhatti
    Attached Files Attached Files
    Teach me Excel VBA

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Code says run time error 424 Object required
    By Ayoub99k in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-17-2015, 06:31 PM
  2. Compile Error - Object Required when opening Userform on another PC
    By Scoobymoo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2015, 05:48 AM
  3. [SOLVED] List of items in a userform listbox, object required error in code
    By jayherring86 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2015, 09:10 AM
  4. UserForm "run time Error 424 Object Required"
    By bimo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2014, 07:47 AM
  5. [SOLVED] Simple Calendar pop up macro --> error Run-time error '424': Object required
    By am_hawk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2013, 10:38 AM
  6. [SOLVED] 424 Object required error when calling a UserForm from another
    By rybussell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2013, 01:16 PM
  7. Compile error : object required in userform
    By asha3010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2010, 04:08 AM

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