Correction de mon code

Fermé
Chrisnapoli - Modifié le 13 juin 2018 à 14:33
yg_be Messages postés 23342 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 21 novembre 2024 - 13 juin 2018 à 18:04
Bonjour,
quelqu'un peut il m 'écrire correctement mon code SVP,cela m affiche erreur de syntaxe (je ne connais pas VBA)

Merci
Option Compare Text
Private Sub linkrg(target As Range, source As Range)
source.Copy
target.Parent.Activate
target.Select
target.Parent.Paste link:=True
Application.CutCopyMode = False
End Sub
Sub RecopiePlage()

Application.ScreenUpdating = True
If [AY101]<-0,0175 Then
Call linkrg([CK11:CS51], [BA101:BI141])
Elself [AY144]<-0,014 ; [AY144]>=-0,0175 Then
Call linkrg([CK11:CS51], [BA144:BI184])
ElseIf [AY187]<-0,009 ; [AY187]>=-0,014 Then
Call linkrg([CK11:CS51], [BA187:BI227])
ElseIf [AY230]<-0,005 , [AY230] >=-0,009 Then
Call linkrg([CK11:CS51], [BA230:BI270])
ElseIf [AY273] <0 ; [AY273] >)-0,005 Then
Call linkrg([CK11:CS51], [BA273:BI313])
End If
If [BY101] >0,0175 Then
Call linkrg([DB11:DJ51], [BO101:BW141])
ElseIf [BY144] >0,014 ; [BY144] <=0,0175 Then
Call linkrg([DB11:DJ51], [BO144:BW184])
ElseIf [BY187] >0,009 ;[BY187]<=0,014 Then
Call linkrg([DB11:DJ51], [BO187:BW227])
ElseIf [BY230] >0,005 ; [BY230]<=0,009Then
Call linkrg([DB11:DJ51], [BO230:BW270])
ElseIf [BY273] >= 0 ; [BY273] <=0,005Then
Call linkrg([DB11:DJ51], [BO273:BW313])
End If
If [AY316] <=0,0175 Then
Call linkrg([CK57:CS97], [BA316:BI356])
ElseIf [AY359] <-0,014 ; [AY359] >=-0,0175 Then
Call linkrg([CK57:CS97], [BA359:BI399])
ElseIf [AY402] <-0,009 ; [AY402] >=-0,014Then
Call linkrg([CK57:CS97], [BA402:BI442])
ElseIf [AY445] <=0,005 ; [AY445] >=-0,009 Then
Call linkrg([CK57:CS97], [BA445:BI485])
ElseIf [AY488] <0 ; [AY488] >=-0,005 Then
Call linkrg([CK57:CS97], [BA488:BI528])
End If
If [BY316] > 0,0175 Then
Call linkrg([DB57:DJ97], [BO316:BW356])
ElseIf [BY359] >0,014 ; [BY359] <=0,0175 Then
Call linkrg([DB57:DJ97], [BO359:BW399])
ElseIf [BY402] >0,009 ;[BY402] <=0,014 Then
Call linkrg([DB57:DJ97], [BO402:BW442])
ElseIf [BY445] >0,005 ; [BY445] <=0,009 Then
Call linkrg([DB57:DJ97], [BO445:BW485])
ElseIf [BY488] >=0 ; [BY488] ;<=0,005 Then
Call linkrg([DB57:DJ97], [BO488:BW528])
End If
Cells(12, 1).Activate
ActiveWindow.ScrollRow = ActiveCell.Row
End Sub





A voir également:

1 réponse

yg_be Messages postés 23342 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 21 novembre 2024 Ambassadeur 1 550
13 juin 2018 à 18:04
0