Run-time Error '50290' on Worksheet Change Macro

ascalise

New Member
Joined
Oct 8, 2015
Messages
21
On one PC I have the following code fails and raises the '50290' run-time error. The model range is a data validation dropdown list on the same worksheet. If I remove the data validation, it works. What is causing the list to hang the process on this one PC? This script previously worked for years without issue, and still works on other devices.

I found this unmarked answer on stackoverflow which seems to be in-line with what I'm experiencing, as Application.Ready throws false on the worksheet change, despite being the only script running, but waiting for Application.Ready to flip leads to what seemingly is an infinite loop. Not sure what else is slowing things down in the background. Anybody have any ideas?

VBA Code:
Sub Worksheet_Change(ByVal Target As Range)
    Dim model As Range: Set model = Range("G19")

    If Not Intersect(Target, model) Is Nothing Then
            Debug.Print "model"
    End If
End Sub

image
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
What exactly are you trying to do? It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0
Box isn't sending me an account validation email, nor can I download add-ins on this PC, the attached documentation will need to suffice for now.
Box finally got the email out, here's a test workbook I created that exhibits the described behavior:


I just don't want a dropdown selection from the list in Range("G19") to throw a '50290' error when Worksheet_Change runs after making the selection. If I can see the debug statement in the immediate console with the above code it's a success.
 
Upvote 0
Try:
VBA Code:
Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("G19")) Is Nothing Then
        MsgBox Target
    End If
End Sub
 
Upvote 0
What exactly is the Data Validation rule in G19?

If it works on everyone's computer except one person, that suggest that the problem is probably with that users computer or environment, and not with the VBA code.
They could have a corrupt version of Excel and may need a re-install.
 
Upvote 0
Currently data validation is just a simple list of numbers (1,2,3) to get the point across, in the original workbook it was an INDIRECT to reference table. At this point it's seeming like a corruption in Excel as it only happens with dropdown lists on this single PC. Just worrying that it happened out of the blue.
 
Upvote 0
Try:
VBA Code:
Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("G19")) Is Nothing Then
        MsgBox Target
    End If
End Sub

Same error. I just noticed now that if I double click the range to bring it into focus and show the cursor and click away it runs the macro just fine. It's only when I make a selection with the dropdown arrow that it throws the error. So seemingly not a code issue, something in my installation is just broken causing Application.Ready to be stuck False after dropdown selection.
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,925
Members
449,056
Latest member
denissimo

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