Rapport de message :*
 

Re: convertir Cotes

Titre du sujet : Re: convertir Cotes
par Samuel59 le 12/03/2012 13:24:24

Bonjour le forum,
Bonjour Myta,
est ce qu'il serais possible de modifier ce code:

Private Sub CommandButton2_Click()
'Bouton Mise à jour des Cotes
Dim Cel As Range

ActiveSheet.TextBox1.Visible = True

With Sheets("ReqDate")
  For Each Cel In .Range("A2:A" & .Cells(Rows.Count, 1).End(xlUp).Row)
    If ComboBox1 = Cel And Cel.Offset(, 2) = Trim(Split(ComboBox2, " - ")(0)) Then
    Call Get_CourseCotes(Cel.Hyperlinks(1).Address)
    End If
  Next Cel
End With

Call CopierCotes
ActiveSheet.TextBox1.Visible = False

End Sub
pour le mettre dans un module comme ceci:

Sub importcotes()

'
'Bouton Mise à jour des Cotes
Dim Cel As Range

ActiveSheet.TextBox1.Visible = True

With Sheets("ReqDate")
  For Each Cel In .Range("A2:A" & .Cells(Rows.Count, 1).End(xlUp).Row)
    If ComboBox1 = Cel And Cel.Offset(, 2) = Trim(Split(ComboBox2, " - ")(0)) Then
    Call Get_CourseCotes(Cel.Hyperlinks(1).Address)
    End If
  Next Cel
End With

Call CopierCotes
'ActiveSheet.TextBox1.Visible = False

End Sub