I am trying to create Excel VBA code in a cell that alternates 'IN' and 'OUT' by double clicking the cell. It looks like I have to use: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, cancel As Boolean) in the Sheet1 rather than in a module.
In the same Sheet1, I already have same function in another cell that alternates 'In Operation', 'Failing', and 'Not Operational', which works great.
When I try to copy the code and execute with different range name, I get the compile error message of 'ambiguous name detected.'
How can I go about to avoid the error message and make this work?
Any help wile very appreciated.
Target
range that comes in as parameter and act accordingly – A.S.H