I have some VBA functions which print a string on the cell from where it's called.
For e.g.
Now let's say I call this from Cell A1 as "=PrintStuff()", then you see either Lesser or Not Lesser in Cell A1
Now I call this function & other similar functions many, many times in my worksheet.
What I want is that once the function call is evaluated & something is written on to the cell, it becomes permanent. i.e. it doesn't reevaluate the function everytime the sheet is opened - is this possible
Why I want this is because sometimes when I reopen the sheet, Lesser gets changed to Not Lesser & vice versa. This is inspite of the cells which the function checks not changing. I clear out the formula call from the cell, & rewrite the call, the string goes back to what was originally being printed.
So is there a way to freeze the output of a VBA function call?
For e.g.
Code:
Public Function PrintStuff() As String
Val1 = Application.ThisCell.Offset(0, -3)
Val2 = Application.ThisCell.Offset(-1, -3)
If (Val1 < Val2) Then
PrintStuff = "Lesser"
Else
IsDirRevd = "Not Lesser"
End If
End Function
Now I call this function & other similar functions many, many times in my worksheet.
What I want is that once the function call is evaluated & something is written on to the cell, it becomes permanent. i.e. it doesn't reevaluate the function everytime the sheet is opened - is this possible
Why I want this is because sometimes when I reopen the sheet, Lesser gets changed to Not Lesser & vice versa. This is inspite of the cells which the function checks not changing. I clear out the formula call from the cell, & rewrite the call, the string goes back to what was originally being printed.
So is there a way to freeze the output of a VBA function call?