Private Sub ListBox3_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
'MsgBox (ListBox3.ListIndex + 1)
'MsgBox (ListBox3.Name)
'MsgBox (ListBox3.List(ListBox3.ListIndex + 1))
'Dim NOMAUSF As Object
GoTo suite
Dim oData As New DataObject
NOMATUSF = ListBox3.List(ListBox3.ListIndex)
'Stop
'MsgBox NOMATUSF
'Merci beaucoup GES pour la Copie dans Clipboard (presse papier) issu de NommerUneTable.xls
'Dim oData As New DataObject
' oData.SetText Trim(lFormule.Caption)
' oData.PutInClipboard
oData.SetText Trim(NOMATUSF)
oData.PutInClipboard
Unload Me
Sleep 1000
Application.SendKeys ("%{F11}"), True
Sleep 100
Application.SendKeys ("{F7}"), True
Sleep 100
Application.SendKeys ("^f"), True
Sleep 100
'Application.SendKeys ("{CLEAR}"), True
Application.SendKeys ("%j"), True
Sleep 100
Application.SendKeys ("%r"), True
Sleep 100
'Application.SendKeys ("+{TAB}"), True
Application.SendKeys ("+{INSERT}"), True
Sleep 100
'Application.SendKeys (NOMATUSF), True
Application.SendKeys ("~"), True
Sleep 100
'Application.SendKeys ("{ESC}"), True
suite:
If Left(ListBox3.List(ListBox3.ListIndex), 8) = "Function" Then NAC1 = Replace(ListBox3.List(ListBox3.ListIndex), "Function ", ""): NAC2 = Left(NAC1, InStr(NAC1, "(") - 1): GoTo suite2
If Left(ListBox3.List(ListBox3.ListIndex), 7) = "Private" Then NAC1 = Replace(ListBox3.List(ListBox3.ListIndex), "Private Sub ", ""):: GoTo suite4
If Left(ListBox3.List(ListBox3.ListIndex), 3) = "Sub" Then NAC1 = Replace(ListBox3.List(ListBox3.ListIndex), "Sub ", ""): GoTo suite4
suite2:
NAC2 = Left(NAC1, InStr(NAC1, "(") - 1)
suite4:
NAC2 = Replace(NAC1, "()", "")
Application.Goto Reference:=NAC2 'ListBox3.List(ListBox3.ListIndex)
End Sub