Activating Macro Based On Change In Cell Value

hipster

New Member
Joined
Sep 29, 2005
Messages
16
I have created a macro for a spreadsheet I am developing and would like it to execure whenever there is a change in the vlue of a cell. The cell contains the selection from a pull down menu. So whenever I select another value from the menu that will be shown in cell M30 I want the macro below to automatically execute.

Would appreciate any suggestions. The current macro is below.

Hipster

Sub PasteClimateData8()
'
' PasteClimateData8 Macro
' Macro recorded 11/8/2005 by Mike Schell
'
' Keyboard Shortcut: Option+Cmd+g
'
Sheets("Climate Data").Select
Range("B1").Select
Application.CutCopyMode = False
Selection.Copy
Cells.Find(What:=ActiveCell.Text, After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext _
, MatchCase:=False).Activate
ActiveCell.Range("A1:B1").Select
ActiveWindow.ScrollRow = 8746
ActiveCell.Range("A1:B8762").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calculations").Select
Range("D10").Select
ActiveSheet.Paste
Sheets("Inputs").Select
End Sub
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
How have you created the dropdown?
 
Upvote 0
Dropdown

Dropdown was made using a combo box using the forms toolbox. I am interested in hearing about how this question is relevant.

I have a Vlookup that identifies the selected value from the reference cells for the Combo box. The macro starts at that Vlookup value. If that value changes I want to run the macro.

Thanks for any help you could provide.
 
Upvote 0
The question is relevant because changing a cell using some methods will trigger a Worksheet change event and some others won't.

As far as I know changing the value of a cell with a combobox from the Forms toolbar won't, though you can assign a macro to the combobox that will be triggered by a change in the combobox, not the cell it is linked to
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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