Object Required error with ActiveX Combobox

kgartin

Board Regular
Joined
May 6, 2010
Messages
207
Office Version
  1. 365
Platform
  1. Windows
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:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top