Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to copy a worksheet without its code ? | Excel Programming | |||
VBA Code to copy a worksheet to another Excel Workbook | Excel Programming | |||
Copy Worksheet without VB code attached? | Excel Programming | |||
Code to copy range vs Copy Entire Worksheet - can't figure it out | Excel Programming | |||
Copy worksheet, code and all, into workbook? | Excel Programming |