Du kan bruge Shell-funktionen. Følgende eksempel er kopieret fra onlinehjælpen i VBA:
\' Specifying 1 as the second argument opens the application in \' normal size and gives it the focus. Dim RetVal RetVal = Shell(\"C:\\WINDOWS\\CALC.EXE\", 1) \' Run Calculator.
\'-------------------------- Form1 -------------------------- Private 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
Private Sub Form_Load() ShellExecute Me.hwnd, vbNullString, \"C:\\WINDOWS\\NOTEPAD.EXE\", vbNullString, \"C:\\WINDOWS\", SW_NORMAL End Sub \'-------------------------- Form1 --------------------------
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.