Bonjour,
J'ai un code pour copier des valeur de cellules précise vers une autre feuille mais je bloque directemant a la ligne suivante qui est en gras. je n'arrive pas a comprendre ce qui peut clocher.
Quelqu'un peut m'aider?
Option Explicit
Public Const FC = "CALCULS"
Public Const PClient = "C5"
Public Const PContact = "F5"
Public Const DesProjet = "C8"
Public Const NoProjet = "F8"
Public Const TypePrix = "C11"
Public Const Coutant = "E24"
Public Const Vendant = "H24"
Public Const NoteProjet = "I5"
Public Const FH = "HISTORIQUES"
Public Const HPClient = "C"
Public Const HPContact = "E"
Public Const HDesProjet = "G"
Public Const HNoProjet = "I"
Public Const HTypePrix = "J"
Public Const HCoutant = "K"
Public Const HVendant = "L"
Public Const HNoteProjet = "M"
Public Const lideb = 5
Public Sub Histo()
Dim PClient As String, PContact As String, DesProjet As String, NoProjet As String, TypePrix As String, Coutant As String, Vendant As String, NoteProjet As String, liFH As Long
With Sheets(FC)
PClient = .Range(HPClient).Cells(1, 1).Value
PContact = .Range(HPContact).Cells(1, 1).Value
DesProjet = .Range(HDesProjet).Cells(1, 1).Value
NoProjet = .Range(HNoProjet).Cells(1, 1).Value
TypePrix = .Range(HTypePrix).Cells(1, 1).Value
Coutant = .Range(HCoutant).Cells(1, 1).Value
Vendant = .Range(HVendant).Cells(1, 1).Value
NoteProjet = .Range(HNoteProjet).Cells(1, 1).Value
End With
With Sheets(FH)
liFH = .Range(HPClient & Rows.Count).End(xlUp).Row + 1
If liFH <= lideb Then liFH = lideb + 1
.Range(HPClient & liFH).Value = PClient
.Range(HPContact & liFH).Value = PContact
.Range(HDesProjet & liFH).Value = DesProjet
.Range(HNoProjet & liFH).Value = NoProjet
.Range(HTypePrix & liFH).Value = TypePrix
.Range(HCoutant & liFH).Value = Coutant
.Range(HVendant & liFH).Value = Vendant
.Range(HNoteProjet & liFH).Value = NoteProjet
End With
End Sub