Results 1 to 4 of 4

Thread: Object Required error with ActiveX Combobox
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    May 2010
    Posts
    184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Object Required error with ActiveX Combobox

    Why do codes A & B below give me an Object Required (424) error (A is assigned to a button, B obviously fires on WB open) but C works without any issues?:

    A:
    Code:
    ComboBox1.Value = ""
    ComboBox2.Value = ""
    B:
    Code:
    Private Sub Workbook_Open()
    
    
    Dim ROWC As Integer
    
    
    ROWC = Worksheets("JOB NAMES").Cells(Rows.Count, 2).End(xlUp).Row
    
    
    ComboBox1.List = Worksheets("JOB NAMES").Range("B3:B" & ROWC).Value
    
    
    End Sub
    C:
    Code:
    Private Sub ComboBox1_Change()
    
    
        ComboBox2.Value = ""
    
    
    End Sub
    Last edited by kgartin; Sep 23rd, 2019 at 12:31 PM.

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    29,229
    Post Thanks / Like
    Mentioned
    483 Post(s)
    Tagged
    49 Thread(s)

    Default Re: Object Required error with ActiveX Combobox

    Assuming the the combos are on a sheet, code C works because it's in the relevant sheet module.
    code B (and possibly A) fails because you have not qualified the combo with the sheet name
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    Board Regular
    Join Date
    May 2010
    Posts
    184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Object Required error with ActiveX Combobox

    Yep that's it. Thanks for the response!

  4. #4
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    29,229
    Post Thanks / Like
    Mentioned
    483 Post(s)
    Tagged
    49 Thread(s)

    Default Re: Object Required error with ActiveX Combobox

    You're welcome & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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