Worksheet_Change Issues

juliabrushett

New Member
Joined
Jul 27, 2018
Messages
6
Okay, so correct me if I'm wrong, but the purpose of the Worksheet_Change function is to run your code and update each time something is changed in the actual Excel sheet, right?

I am having trouble using the Worksheet_Change method in my VBA program. Photos here of my code and then of my worksheet:

https://drive.google.com/file/d/0B8hxU3V2A7OlbXYxRGo2UlhqZk83dUhPaTlEMTFNVnNLYmVZ/view
https://drive.google.com/file/d/0B8hxU3V2A7OlQTdjTFQ1X3h4YTBiUUVJX2htZmV2RmJaZzlz/view

The idea is to have a heat map made based off of some color-scaled conditional formatting. While the map and conversion from cells->shapes works fantastically with the regular Sub method, I just can't get the Sub Worksheet_Change to workout.

Just an FYI, I am VERYYYY elementary when it comes to VBA. My background is in Java and Python, and so I've been trying to learn VBA for use with Excel but have just started, and with very basic remembrances of the language from High School, am probably struggling over something so trivial:ROFLMAO:
 

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.
but the purpose of the Worksheet_Change function is to run your code and update each time something is changed in the actual Excel sheet
To clarify, it only runs when a cell on that sheet is manually updated. So it would not capture values that are changed via formula (or Conditional Formatting).

The Worksheet_Calculate event is triggered when any values change (i.e. as the result of formulas), though it cannot pinpoint exactly which cell it was that changed.
 
Upvote 0

Forum statistics

Threads
1,214,974
Messages
6,122,536
Members
449,088
Latest member
RandomExceller01

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