Forum Discussion
help with formula
Lizzy_G Perhaps this code in the worksheet is what you mean:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, cancel As Boolean)
ActiveCell.Value = Chr(195)
End SubDouble click on a cell in the sheet where this code resides and it will come out like this:
Riny_van_Eekelen hi thank you for replying. i copied this and
pasted in a cell but it did not work. i have absolutely no clue what i am doing.
i am making a list and when it has been completed, i want to double click in a cell and a tick will appear.
- Riny_van_EekelenOct 10, 2021Platinum Contributor
Lizzy_G I was not clear. Sorry. The code need to be entered into a cell. It need to go into the "code for for the worksheet you are working in".
Right-click on the sheet tab and select "View code"
This will open the Visual Basic editor.
Then, copy the code like in the picture below:
Now save the workbook, macro-enables (I.e. xlsm)
I've attached such a workbook, so that you see how it should look like.
The above screenshots were made on a Mac, bit it's similar on a PC.
- HansVogelaarOct 10, 2021MVP
The text posted by Riny is VBA code. It belongs in the worksheet module.
See the attached sample workbook. If you want to inspect the code, right-click the sheet tab and select 'View Code' from the context menu.