View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default How can I use VB code to execute macro when double-clicking cell?

try this idea
right click sheet tabview codeinsert thisSAVE
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column < 1 Then Exit Sub
Application.Goto Sheets("sheet7").Range(Target.Address)
End Sub

--
Don Guillett
SalesAid Software

"JDay01" wrote in message
...
I have a range of cells on Sheet 1 (lets say, range C10:Z500). For each
cell
in this range, I want to program it so that when a user double-clicks a
cell,
it takes them to the same cell reference on Sheet 2. (i.e. if I click
cell
G45 on the first sheet, it takes me to cell G45 on the second sheet).
Can
anyone help me with the proper code for this action?