View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill[_30_] Bill[_30_] is offline
external usenet poster
 
Posts: 89
Default Copy Worksheet with Code

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