Hi
I have a spreadsheet with various formulae across the columns. I have a macro which inserts a new row with format & formulae below a double-click.
Each worksheet represents a financial year & when I set it up, I covered 3 years. I now need to add a year and I have copied the data into a new sheet but the macro isn't working. I can't see any way to trigger it for the new sheet as all the sheets are listed on the VBA Project along with the Module.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True 'Eliminate Edit status due to doubleclick
Target.Offset(1).EntireRow.Insert
Target.EntireRow.Copy Target.Offset(1).EntireRow
On Error Resume Next
Target.Offset(1).EntireRow.SpecialCells(xlConstants).ClearContents
On Error GoTo 0
End Sub
I have a spreadsheet with various formulae across the columns. I have a macro which inserts a new row with format & formulae below a double-click.
Each worksheet represents a financial year & when I set it up, I covered 3 years. I now need to add a year and I have copied the data into a new sheet but the macro isn't working. I can't see any way to trigger it for the new sheet as all the sheets are listed on the VBA Project along with the Module.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True 'Eliminate Edit status due to doubleclick
Target.Offset(1).EntireRow.Insert
Target.EntireRow.Copy Target.Offset(1).EntireRow
On Error Resume Next
Target.Offset(1).EntireRow.SpecialCells(xlConstants).ClearContents
On Error GoTo 0
End Sub