Thread: [Solved] Worksheet_BeforeDoubleClick
View Single Post
 
Old 02-20-2018, 01:39 AM
trevorc trevorc is offline Windows 7 32bit Office 2013
Competent Performer
 
Join Date: Jan 2017
Posts: 173
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default Worksheet_BeforeDoubleClick

Hi all,
I'd like to know how to use the code below on several worksheets that have the same fields, I use different sheets for each of our customers and would like to be able to add a new customer without having to add the vba code to each worksheet. Can I put it in the workbook reference somehow to make it work for all sheets in the workbook, based on the activesheet reference or is this not possible?

Sample found on web...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("A3:A25")) Is Nothing Then
'code
'code
'code
End If
End Sub

Last edited by trevorc; 02-20-2018 at 01:40 AM. Reason: Title update
Reply With Quote