Design a few buttons, each button when you click start a specified program How to start a blank Word document, InternetExplor, drawing and so on
CodePudding user response:
With shell and then directly with the program path Shell (Application. StartupPath & amp; "\ ABC exe," vbNormalFocus)
CodePudding user response:
If you need to run the exe directory in the PATH environment variable, or your own program in the same directory, can directly use the name of exe to start Process. The Start (" mspaint. Exe ") Process. The Start (" notepad. Exe ")
Otherwise, use the full path to start Process. The Start (" C: \ Program Files \ Microsoft Office \ Office16 \ excel exe ")
CodePudding user response:
Shell (" C: \ Program Files \ Internet Explorer \ iexplore (x86) exe http://www.baidu.com ", Wait:=True) Dim tp As String=My. Application. Info. DirectoryPath & amp; "\ test. The text" IO. File. WriteAllBytes (tp, {51} 48, 49,) Process. The Start (notepad. Exe, tp)