Run Time Error 380, Invalid Property Value - Excel VBA

LukeP1

New Member
Joined
May 1, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to create VBA code that sets the value of an active-x combobox based on the cell value in the current active row. I have pasted a screen grab below of the code and error message. I would be very grateful if somebody could tell me what I am doing wrong. Many Thanks

1620308158222.png
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
If you have a combobox, why is your code referring to a listbox?
 
Upvote 0
If you in fact have a listbox, then it looks like the value in Range("bh" & (Activecell.Row)) cannot be found within the list of items in your listbox. Hence, the item cannot be selected in the listbox, resulting in the error.
 
Upvote 0
Hi, thanks for the feedback. Yes, it is a list box, my reference to a Combobox was a typo. I am using a named range from column 'bh' to populate my list box options, so the value in Range("bh" & (Activecell.Row)) is one of the list box options so that cant be the error.

The code actually works sometimes and then also randomly gives the error message.

Any ideas ? thanks
 
Upvote 0
When it fails are you sure that you have not selected a cell or range that is outside the area of the named range.
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

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