How do I solve this invalid property value? Error 380

vbaNumpty

Board Regular
Joined
Apr 20, 2021
Messages
171
Office Version
  1. 365
Platform
  1. Windows
I am trying to concatenate some values if a checkbox is activated in a userform, but it keeps giving me the 380 error. What am I doing wrong?

VBA Code:
Private Sub NeedReview_Change()

    Dim existingNotes As Variant
    Dim needRev As Variant
    
    needRev = " - NEEDS REVIEW"
    existingNotes = CustomerBox.Value

    If NeedReview.Value = True Then
        CustomerBox.Value = existingNotes & needRev
    Else
        CustomerBox.Value = Left(CustomerBox.Value, Len(CustomerBox.Value) - 15)
    End If
        
End Sub
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Which line is causing the error?

Maybe this line CustomerBox.Value = Left(CustomerBox.Value, Len(CustomerBox.Value) - 15)?

Probably when CustomerBox contains less than 15 characters?
 
Upvote 0
Which line is causing the error?

Maybe this line CustomerBox.Value = Left(CustomerBox.Value, Len(CustomerBox.Value) - 15)?

Probably when CustomerBox contains less than 15 characters?
No, its the following line:

VBA Code:
CustomerBox.Value = existingNotes & needRev

There will never be an instance where the amount of characters is < 15. It's impossible
 
Upvote 0
Is the MatchRequired property of CustomerBox set to True? If so, the value would have to be a valid item from the combobox.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,429
Messages
6,124,834
Members
449,192
Latest member
mcgeeaudrey

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