Merci pour cette réponse. Le ShellExecute me servira surement pour la suite.
Par contre pour avoir essayé simplement
1 2
| Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Const SW_SHOWNORMAL = 1 |
dans module
et
1 2 3 4
| Sub simexe()
fName = "M:\donnees\fichier.sxo"
RetVal = ShellExecute(hwnd, "Open", fName, ByVal 0&, 0&, SW_Normal)
End Sub |
, à l'exécution de la macro le logo d'ouverture du logiciel s'affiche puis plus rien 
sinon j'ai aussi testé ça
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
dans module et
1 2 3 4 5 6 7 8 9 10 11
|
Sub ShellExec()
Dim strFile As String
Dim strAction As String
Dim lngErr As Long
strFile = "M:\donnees\macro\testmac.sxo"
strAction = "OPEN"
lngErr = ShellExecute(0, strAction, strFile, "", "", 0)
End Sub |
mais même problème
Partager