Hello,
I'm having issues getting a function to work properly. Essentially, I am trying to make a function that will conditionally format a row for the user. (Yes, there is a reason I'm not using conditional formatting.) My problem is that, while I can get similar code working in a subprocedure, I am having issues getting the code to work in a function. Here is a quick example of what I mean:
Similarly, when I use this line in my actual function, it does nothing. I believe I do not properly understand how, or if, you can format a row with a function.
Any help would be greatly appreciated.
I'm having issues getting a function to work properly. Essentially, I am trying to make a function that will conditionally format a row for the user. (Yes, there is a reason I'm not using conditional formatting.) My problem is that, while I can get similar code working in a subprocedure, I am having issues getting the code to work in a function. Here is a quick example of what I mean:
Code:
Sub YellowNOW2()
'Turns entire Row Yellow
ActiveCell.EntireRow.Interior.Color = 65535
End Sub
Code:
Function YellowNOW(Range2 As Range)
'Does nothing
Range2.EntireRow.Interior.Color = 65535
End Function
Similarly, when I use this line in my actual function, it does nothing. I believe I do not properly understand how, or if, you can format a row with a function.
Any help would be greatly appreciated.