colinharwood
Active Member
- Joined
- Jul 27, 2002
- Messages
- 426
- Office Version
- 2019
- Platform
- Windows
Hi
After copying a worksheet which contains a function to a new workbook, the function disappears from the worksheet, is there a way to overcome this.
Thanks a lot
This is the worksheet code:
Private Sub Worksheet_Activate()
ActiveWindow.SmallScroll Down:=-96
Range("A3").Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
With Cells(ActiveCell.Row, 1).Resize(1, 21).Interior
.ColorIndex = 40
.Pattern = xlSolid
End With
rowOffset = -4
End Sub
Function AddSpace(Str As String) As String
Dim i As Long
For i = 1 To Len(Str)
AddSpace = AddSpace & Mid(Str, i, 1) & " "
Next i
AddSpace = Trim(AddSpace)
End Function
After copying a worksheet which contains a function to a new workbook, the function disappears from the worksheet, is there a way to overcome this.
Thanks a lot
This is the worksheet code:
Private Sub Worksheet_Activate()
ActiveWindow.SmallScroll Down:=-96
Range("A3").Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
With Cells(ActiveCell.Row, 1).Resize(1, 21).Interior
.ColorIndex = 40
.Pattern = xlSolid
End With
rowOffset = -4
End Sub
Function AddSpace(Str As String) As String
Dim i As Long
For i = 1 To Len(Str)
AddSpace = AddSpace & Mid(Str, i, 1) & " "
Next i
AddSpace = Trim(AddSpace)
End Function