View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default Copy Worksheet with Code

There is a similar option for the double click event in the thisworkbook
module. Why not use that one. Then you don't have to worry about the sheet
being deleted or such. You will have to speicfy how each sheet will (or
won't react to the double click)

--
HTH...

Jim Thomlinson


"Bill" wrote:

Hello,
I have a sheet that is set up so when someone double clicks a row, a
subroutine is called. I put this code into the worksheet;

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Call Mysub
End Sub

The problem is that someone could delete this sheet. So, I had a copy of it
hidden; I search to see if it is there - if not, I copy the sheet from the
hidden sheet. But the code does not copy. Is there a way to do this? I
don't want to protect the workbook.

Many thanks.

Bill