J'ai utilisé l'instruction SHELL afin d'ouvrir un logiciel qui doit me permettre d’exécuter un code que je crée à partir de VBA excel et que j' enregistre dans un fichier texte.
Ma demande est la suivante:
Après avoir ouvert le logiciel comment faire en sorte que mon fichier texte s'ouvre à l’intérieur du logiciel avec l'aide d'une commande comme un BOUTON par exemple.
en argument de l'instruction SHELL, c'est le chemin et nom de ton logiciel qu'il faut mettre... !!!
si ton logiciel accepte un argument en ligne de commande, il est alors envisageable
de completer l'argument d'exécution avec le nom du ficher texte à ouvrir
VB:
Private Sub Ouvrir_prog_Click()
Unload test_shell
Application.WindowState = xlMinimized
rep = Shell("C:\cheminTMCL\TMCL.exe C:\Users\N12ico\MonFichierTMCL.Txt", vbNormalFocus)
End Sub
Private Sub Ouvrir_prog_Click()
Dim rep$
Unload test_shell
Application.WindowState = xlMinimized
rep = Shell("C:\Windows\notepad.exe C:\Users\N12ico\Main.txt", vbNormalFocus)
End Sub
'DANS UN MODULE
Public Const fichier As String = "C:\Windows\notepad.exe C:\Users\N12ico\Main.txt"
Private Sub Ouvrir_prog_Click()
Dim rep$
Unload test_shell
Application.WindowState = xlMinimized
rep = Shell(fichier, vbNormalFocus)
End Sub
The TMCL/PC-IDE looks very much like the TMCL-IDE. It mainly provides an integrated editor and a TMCL/PC
assembler. It also provides an integrated TMCL/PC interpreter that executes a program that has been assembled
by the TMCL/PC assembler. There are also some powerful debugging facilities (setting breakpoints, inspecting
local variables).