worksheet change event

Av8tordude

Well-known Member
Joined
Oct 13, 2007
Messages
955
I'm using the code below to change the font colors of cells that have constant values (works well). However, I notice the code triggers a worksheet change event, which I'm puzzled as to why this code triggers a worksheet change event?

VBA Code:
Cells(ActiveCell.Row, 20).Resize(, 49).SpecialCells(xlConstants).Font.Color = RGB(14, 33, 56)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,231
Office Version
  1. 365
Platform
  1. Windows
Nope, your code does not trigger either a change event or a selection change event for me.
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,231
Office Version
  1. 365
Platform
  1. Windows
Scrub that, I must have done something wrong last time.
It will trigger the selection change event because you have used SpecialCells.
 

Av8tordude

Well-known Member
Joined
Oct 13, 2007
Messages
955
I found information regarding SpecialCells and it seems, this selects the cells, thus triggering selection event.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,231
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

That's right, it's something I keep forgetting.
 

Av8tordude

Well-known Member
Joined
Oct 13, 2007
Messages
955
Ok..Now I can feel better knowing a little than I knew yesterday. thank you for helping me solve this.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,399
Office Version
  1. 365
Platform
  1. Windows
edit:- ignore this reply, I didn't see all of the replies and was responding to an older post (last one on page 2) :oops:
 

Watch MrExcel Video

Forum statistics

Threads
1,126,957
Messages
5,621,823
Members
415,859
Latest member
Vain

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
Top