Worksheet Beforedoubleclick Single Click. Private sub worksheet_beforedoubleclick(byval target as range, cancel as boolean) cancel = true worksheet_selectionchange target end sub private sub worksheet_selectionchange(byval target as range)if intersect(target, range(b9:af129)) is nothing then exit sub 'if the target cell is clear if target.interior.colorindex = xlnone then 'then. You can only have one of the beforedoubleclick subs, you need to check inside of it for each of the cells you want.
Hey, i need to add a double click code for a multiple of cells, is it possible to condense it all under one code as for now i have it all seperated e.g. 1) the event doesn't fire everytime you click a cell which can be annoying. Code added to the worksheet beforedoubleclick event will be executed by excel vba when you double click a cell on a worksheet.