Workbook_SheetActivate only works on some sheets
Hi Per,
I've just tested & I can't trigger anything in the Worksheet_Activate
event of the 2 worksheets either - any others are fine.
There are currently no events in any sheet modules.
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
'Prevent paste of incorrect NHS Number to Activity sheet
Dim GetData As New DataObject
With Application
If .CutCopyMode = 1 Then
GetData.GetFromClipboard
If ActiveSheet.Name = "Activity" And ChkNHSNum2(Left
(GetData.GetText, 10)) < "Valid NHS Number" Then
'For some reason 10 character string = len 12 - maybe 2k for
the clipboard?
.CutCopyMode = 0
End If
End If
End With
End Sub
Cheers,
JF
On 24 Dec, 11:02, Per Jessen wrote:
Hi JF
Post the code, as ít might be something in the code...
Regards,
Per
On 24 Dec., 11:51, Joshua Fandango
wrote:
Hi guys,
The Workbook_SheetActivate event is only triggering on some sheets in
a workbook - nowhere in the project are events disable so has anyone
an idea what could be preventing it working on all sheets?
I've had a good search aroung G Groups etc. but can't find anything
similar.
The 2 sheets out of 5 that it doesn't trigger on are different from
the others as they are protected and have hidden rows & columns but
unprotecting/unhiding has made no difference.
Any thoughts greatfully received.
Merry Christmas,
JF- Hide quoted text -
- Show quoted text -
|