ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   modify cells from VBA formula context (https://www.excelbanter.com/excel-programming/386058-modify-cells-vba-formula-context.html)

Nik[_4_]

modify cells from VBA formula context
 
Hi,

Is there some way I can modify cell properties from a formula context?
I have a formula that takes a range as a parameter in in that formula
I call another sub that is supposed to change font color on the cells
in that range but for some reason nothing happens.


NickHK

modify cells from VBA formula context
 
UDFs cannot change their environment.
So this will not work from a formula.

NickHK

"Nik" wrote in message
ups.com...
Hi,

Is there some way I can modify cell properties from a formula context?
I have a formula that takes a range as a parameter in in that formula
I call another sub that is supposed to change font color on the cells
in that range but for some reason nothing happens.




Carl Hartness[_2_]

modify cells from VBA formula context
 
Have you tried conditional formatting?
Carl
On Mar 26, 4:15 am, "Nik" wrote:
Hi,

Is there some way I can modify cell properties from a formula context?
I have a formula that takes a range as a parameter in in that formula
I call another sub that is supposed to change font color on the cells
in that range but for some reason nothing happens.




Gary''s Student

modify cells from VBA formula context
 
A formula or UDF cannot directly change a cell's colour. This can be
accomplished with either Conditional formatting or an Event Porcedure.
--
Gary''s Student
gsnu200712



All times are GMT +1. The time now is 01:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com