View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default adding restrictions on action Double_Click

Place your code between this lines and it will only work
in the range A1:H20


If Not Application.Intersect(Range("A1:H20"), Target) Is Nothing Then


End If


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Junior Trimon" wrote in message ...
The following code gives an action for double clicking on
a cell in a sheet.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As
Excel.Range, Cancel As Boolean)
MsgBox "You double clicked on cell " & Target.Address
Cancel = True
End Sub

Now I want to add a restriction with this action.
I want this code to work only for a specific range on the
sheet.

Is this possible?