Excel: I want to be able to edit the contents of a cell and not have it call the function that the cell contains.
The following function creates an error "Circular reference ..."
// Cell Contents:
= MyProc(A1 - A2, A3)
// Code from module
function MyProc(val as long, cell as variant) as string
if val < 0 then
MySheet.Cells(cell).Locked = True // <-- this doesn't help
MySheet.Cells(cell).Interior.Color = vbRed
MySheet.Cells(cell).Locked = False
MyProc = cstr(val)