Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: Fix run-time error '424': Object required in Excel VBA

  1. #1
    Join Date
    19th September 2012
    Posts
    73

    Fix run-time error '424': Object required in Excel VBA

    I am working on an Excel Userform to capture transport jobs performed each day. However, I am having a problem in the code with run-time error. I will appreciate it if someone can help me fix the error in the attached Excel document.

    Thanks much.TransLocDB.xlsTransLocDB.xls

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    14th July 2004
    Posts
    10,539

    Re: Fix run-time error '424': Object required in Excel VBA

    You don't have a form called frmDate.

    The form in your file is called frmTrans.
    Boo!

  3. #3
    Join Date
    19th September 2012
    Posts
    73

    Re: Fix run-time error '424': Object required in Excel VBA

    Norie, I changed it from frmTrans to frmDate thinking that was the problem. However, it did not solve the run-time error 424 in the code.

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    14th July 2004
    Posts
    10,539

    Re: Fix run-time error '424': Object required in Excel VBA

    The object required error is because you have cEquipment instead of cEquip here.

    VB:
    For Each cEquip In ws.Range("EquipmentList") 
        With Me.cboEquipment 
            .AddItem cEquipment.Value 
            .List(.ListCount - 1, 1) = cEquipment.Offset(0, 1).Value 
        End With 
    Next cEquip 
    
    
    However that isn't the only problem.

    The combobox cboEquipment is already populated via it's RowSource property.

    There is no named range called 'LocationList'.

    Also, each of the comboboxes you are trying to populate from 'LocationList' are already populated by their RowSource property.
    Boo!

  5. #5
    Join Date
    19th September 2012
    Posts
    73

    Re: Fix run-time error '424': Object required in Excel VBA

    wow, I like the way you break down the problem with the code. As I am a beginner with VBA, formatting the code to get rid of the error is a challenge for me. If you can help me address these issues and attach the Excel file with these changes, I will appreciate it. Thanks much.

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    14th July 2004
    Posts
    10,539

    Re: Fix run-time error '424': Object required in Excel VBA

    I can't really do that.

    For example, I don't know what LocationList should be or what it should be replaced with.

    I could guess, but that guess might be totally wrong and cause further problems.

    Perhaps you should just delete the code since the comboboxes are being populated without it anyway.
    Boo!

  7. #7
    Join Date
    19th September 2012
    Posts
    73

    Re: Fix run-time error '424': Object required in Excel VBA

    What I have is a LookupLists worksheet for the combo boxes. The whole goal of the LookupLists was developed for the combo boxes in the actual userform (for example, equipment combo box, select wheelchair or cart depending on what was used in performing the job from the equipment list). I did not set-up any LocationList in the file that was attached. Thanks a lot for your time on this.

    Excel Video Tutorials / Excel Dashboards Reports


  8. #8
    Join Date
    14th July 2004
    Posts
    10,539

    Re: Fix run-time error '424': Object required in Excel VBA

    If you have no LocationList and the comboboxes are getting populated fine without the code, which they are - I checked, then just delete the code.
    Boo!

  9. #9
    Join Date
    19th September 2012
    Posts
    73

    Re: Fix run-time error '424': Object required in Excel VBA

    The combo boxes are pulling those information from the LookupLists. That is why they are already populated when you view the userform in the object mode.

    Excel Video Tutorials / Excel Dashboards Reports


  10. #10
    Join Date
    19th September 2012
    Posts
    73

    Re: Fix run-time error '424': Object required in Excel VBA

    Norie, I changed the code as suggested and I am still getting the same error code. There must be something I am not doing right. Any assistance will be greatly appreciated. Thanks.

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Replies: 5
    Last Post: August 5th, 2011, 03:06
  2. Replies: 3
    Last Post: December 15th, 2010, 22:11
  3. Run-time Error '424': Object Required
    By minitman in forum EXCEL HELP
    Replies: 3
    Last Post: November 11th, 2006, 10:10
  4. Run-time error 424: Object Required in For Each Loop
    By FWC_Tressler in forum EXCEL HELP
    Replies: 6
    Last Post: October 4th, 2006, 12:45
  5. Run-Time error '424': Object required
    By AutoActuary in forum EXCEL HELP
    Replies: 10
    Last Post: August 24th, 2006, 09:01

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
  •  
porno