Show Userform when cell value changes code not working

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
In my worksheet I have a drop down list in D4 and in E4 I have a XLOOKUP formula with the lookup value being the value in D4. I want a user form to show when the value in E4 changes, however I cannot get my code to work for me.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Intersect(Target, Range("E4")) Is Nothing Then
        Load frmActions
            frmActions.Show
                End If
    End Sub

Any advice would be appreciated.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
The Change event is triggered when a change is done by the user, not by a formula.
I understand that E4 depends on D4; so it should be sufficient modify your Range("E4") to Range("D4") and it should work

Bye
 
Upvote 0
Solution
The Change event is triggered when a change is done by the user, not by a formula.
I understand that E4 depends on D4; so it should be sufficient modify your Range("E4") to Range("D4") and it should work

Bye
Thank you Anthony. That did do it.
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

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