Run Macro when Drop Down value selected

fangfacekitty

Board Regular
Joined
Jul 28, 2010
Messages
63
I need to have my Fx macro run whenever a value is chosen from the drop down list in cell K9. I know I have seen how to do this but for the life of me I can't find a thread today that contains this info. The actual value chosen does not matter, I just need the macro to run every time the value in the cell changes.

On the template cell K9 is blank. So when the user chooses a EUR from the drop down the macro should run automatically (the user shouldn't have to do anything). And if the user then decides to change the currency to USD the macro should run again automatically.

Thanks in advance for your help!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Do you mean attach the code to combo box to call the macro? If so I would just do something like

Code:
Private Sub combobox1_Change()
Call FX
End Sub
 
Upvote 0
or you could right click your sheet tab that contains the pulldown and hit "view code" then

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range
   Set KeyCells = Range("k9")
   Call fx
  
   End Sub
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

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