Hi
When I attempt to insert or delete a line from my worksheet, I get an Error 13 (Incompatible type I think would be the translation to english).
This is an extract from the routine (which works perfectly well when I don't need to insert a line LOL):
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCellCaps As Range
Dim KeyCellNom As Range
Dim KeyCellMedia As Range
Dim KeyCellPrenom As Range
Dim KeyCellVille As Range
Dim KeyCellPostale As Range
Dim KeyCellTel As Range
Dim KeyCellFax As Range
Set KeyCellCaps = Range("A:A")
Set KeyCellNom = Range("A:A")
Set KeyCellPrenom = Range("B:B")
Set KeyCellMedia = Range("C:C")
Set KeyCellPostale = Range("E:E")
Set KeyCellVille = Range("F:F")
Set KeyCellTel = Range("G:G")
Set KeyCellFax = Range("H:H")
Column = "Q"
' Mettre le nom en majuscule et rajouter la date d'ajout
If Not Application.Intersect(KeyCellCaps, Range(Target.Address)) _
Is Nothing Then
Target.Value = UCase(Target.Text)
Intcolumn = Target.Column
introw = Target.Row
Cells(introw, Column) = Now()
End If
End Sub
When I go to debug, it is stopped on Target.Value = UCase(Target.Text)
Thanks
Steph
When I attempt to insert or delete a line from my worksheet, I get an Error 13 (Incompatible type I think would be the translation to english).
This is an extract from the routine (which works perfectly well when I don't need to insert a line LOL):
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCellCaps As Range
Dim KeyCellNom As Range
Dim KeyCellMedia As Range
Dim KeyCellPrenom As Range
Dim KeyCellVille As Range
Dim KeyCellPostale As Range
Dim KeyCellTel As Range
Dim KeyCellFax As Range
Set KeyCellCaps = Range("A:A")
Set KeyCellNom = Range("A:A")
Set KeyCellPrenom = Range("B:B")
Set KeyCellMedia = Range("C:C")
Set KeyCellPostale = Range("E:E")
Set KeyCellVille = Range("F:F")
Set KeyCellTel = Range("G:G")
Set KeyCellFax = Range("H:H")
Column = "Q"
' Mettre le nom en majuscule et rajouter la date d'ajout
If Not Application.Intersect(KeyCellCaps, Range(Target.Address)) _
Is Nothing Then
Target.Value = UCase(Target.Text)
Intcolumn = Target.Column
introw = Target.Row
Cells(introw, Column) = Now()
End If
End Sub
When I go to debug, it is stopped on Target.Value = UCase(Target.Text)
Thanks
Steph