Object Required error with ActiveX Combobox

kgartin

Board Regular
Joined
May 6, 2010
Messages
201
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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,214,424
Messages
6,119,404
Members
448,893
Latest member
AtariBaby

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