Object Required Error Accessing Userform Control

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,562
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I am receiving an "Object Required" error with with this line in red of my code ...

Rich (BB code):
With uf_base_01to_4.ListBox1
    For i = .ListCount - 1 To 0 Step -1
        If .List(i) = f_select Then
            .RemoveItem i
        End If
    Next i
End With

uf_base_1to_04 is my userform, and listbox1 is the listbox with the items slated for removal.

I don't understand what I need to do to resolve the error.
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
What a complicated naming convention. Are you sure you have the correct name?
In your code, you have uf_base_01to_4
in your text, you have uf_base_1to_04

They don't match
 
Last edited:
Upvote 0
Thank you for providing the second set of eyes ... it was indeed a typo. I had it wrong in both cases. 'uf_base_01to_04' is the actual.
 
Upvote 0
Been there done that! Matter of fact, earlier I kept trying to test the following in my Immediate window:
Code:
Cells(17,15).Address

and kept getting an error. I finally gave up and continued coding when I realized what I missed. See it? Took me about 5 minutes *lol*
The frustration of a missing ? - to get a response in the Immediate Window - you need to precede code with a ?
Code:
? Cells(17,15).Address
 
Upvote 0

Forum statistics

Threads
1,214,387
Messages
6,119,222
Members
448,877
Latest member
gb24

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