1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpszOp As _
String, ByVal lpszFile As String, ByVal lpszParams As String, _
ByVal lpszDir As String, ByVal FsShowCmd As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Sub bouton1_cliquer()
Const SW_SHOWNORMAL = 1
Dim hwnd As Long
Dim Fich As String
Fich = "d:\U710464\Bureau\Mission3\BDCF\BDCAmontExtractAll.dqy"
hwnd = FindWindow(vbNullString, Application.Caption)
ShellExecute hwnd, "open", Fich, vbNullString, vbNullString, SW_SHOWNORMAL
Sheets.Add.Move After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = "lolol"
End Sub |
Partager