Shell Function

แƒ แƒ—แƒแƒ•แƒก แƒžแƒ แƒแƒ’แƒ แƒแƒ›แƒแƒก แƒ“แƒ แƒกแƒแƒญแƒ˜แƒ แƒแƒ”แƒ‘แƒ˜แƒก แƒ›แƒ˜แƒฎแƒ”แƒ“แƒ•แƒ˜แƒ— แƒ’แƒแƒœแƒกแƒแƒ–แƒฆแƒ•แƒ แƒแƒ•แƒก แƒจแƒ”แƒกแƒแƒ‘แƒแƒ›แƒ˜แƒกแƒ˜ แƒคแƒแƒœแƒฏแƒ แƒ”แƒ‘แƒ˜แƒก แƒกแƒขแƒ˜แƒšแƒก.

Syntax:

Shell (Pathname As String[, Windowstyle As Integer[, Param As String[, bSync]]])

Parameters:

Pathname

Name of the program that you want to start, optionally with complete path and/or arguments.

Windowstyle

Optional integer expression that specifies the style of the window that the program is executed in.

note

Parameter Windowstyle is only effective on Windows systems. On other systems the parameter is ignored.


The following values are possible:

Windowstyle

Meaning

0

แƒคแƒแƒ™แƒฃแƒกแƒ˜ แƒแƒ แƒ˜แƒก แƒžแƒ แƒแƒ’แƒ แƒแƒ›แƒ˜แƒก แƒ“แƒแƒ›แƒแƒšแƒฃแƒš แƒคแƒแƒœแƒฏแƒแƒ แƒแƒ–แƒ”

Not implemented in LibreOffice.

1

แƒคแƒแƒ™แƒฃแƒกแƒ˜ แƒแƒ แƒ˜แƒก แƒžแƒ แƒแƒ’แƒ แƒแƒ›แƒ˜แƒก แƒคแƒแƒœแƒฏแƒแƒ แƒแƒ–แƒ” แƒกแƒขแƒแƒœแƒ“แƒแƒ แƒขแƒฃแƒš แƒ–แƒแƒ›แƒแƒ–แƒ”.

Not implemented in LibreOffice.

2

แƒคแƒแƒ™แƒฃแƒกแƒ˜ แƒแƒ แƒ˜แƒก แƒ›แƒ˜แƒœแƒ˜แƒ›แƒ˜แƒ–แƒ˜แƒ แƒ”แƒ‘แƒฃแƒšแƒ˜ แƒžแƒ แƒแƒ’แƒ แƒแƒ›แƒ˜แƒก แƒคแƒแƒœแƒฏแƒแƒ แƒแƒ–แƒ”.

3

แƒคแƒแƒ™แƒฃแƒกแƒ˜ แƒแƒ แƒ˜แƒก แƒ›แƒแƒฅแƒกแƒ˜แƒ›แƒ˜แƒ–แƒ˜แƒ แƒ”แƒ‘แƒฃแƒšแƒ˜ แƒžแƒ แƒแƒ’แƒ แƒแƒ›แƒ˜แƒก แƒคแƒแƒœแƒฏแƒแƒ แƒแƒ–แƒ”.

4

แƒžแƒ แƒแƒ’แƒ แƒแƒ›แƒ˜แƒก แƒคแƒแƒœแƒฏแƒ แƒ˜แƒก แƒกแƒขแƒแƒœแƒ“แƒแƒ แƒขแƒฃแƒšแƒ˜ แƒ–แƒแƒ›แƒ, แƒคแƒแƒ™แƒฃแƒกแƒ˜แƒก แƒ’แƒแƒ แƒ”แƒจแƒ”.

Not implemented in LibreOffice.

6

แƒ›แƒ˜แƒœแƒ˜แƒ›แƒ˜แƒ–แƒ˜แƒ แƒ”แƒ‘แƒฃแƒšแƒ˜ แƒžแƒ แƒแƒ’แƒ แƒแƒ›แƒ˜แƒก แƒคแƒแƒœแƒฏแƒแƒ แƒ, แƒคแƒแƒ™แƒฃแƒกแƒ˜ แƒ แƒฉแƒ”แƒ‘แƒ แƒแƒฅแƒขแƒ˜แƒฃแƒ  แƒคแƒแƒœแƒฏแƒแƒ แƒแƒ–แƒ”.

Not implemented in LibreOffice.

10

แƒฉแƒ•แƒ”แƒœแƒ”แƒ‘แƒ แƒ›แƒ—แƒ”แƒšแƒก แƒ”แƒ™แƒ แƒแƒœแƒ–แƒ”.


note

Windowstyle 3 and 10 are equivalent in Windows systems.


Param

String that specifies additional arguments passed to the program.

bSync

แƒ—แƒฃ แƒ”แƒก แƒ›แƒœแƒ˜แƒจแƒ•แƒœแƒ”แƒšแƒแƒ‘แƒ แƒ“แƒแƒงแƒ”แƒœแƒ”แƒ‘แƒฃแƒšแƒ˜แƒ แƒ แƒแƒ’แƒแƒ แƒช true, แƒ’แƒแƒ แƒกแƒ˜แƒก แƒ‘แƒ แƒซแƒแƒœแƒ”แƒ‘แƒ แƒ“แƒ แƒงแƒ•แƒ”แƒšแƒ LibreOffice แƒ“แƒแƒ•แƒแƒšแƒ”แƒ‘แƒ”แƒ‘แƒ˜ แƒ˜แƒชแƒ“แƒ˜แƒแƒœ, แƒ’แƒแƒ แƒกแƒ˜แƒก แƒ“แƒแƒ›แƒ—แƒแƒ•แƒ แƒ”แƒ‘แƒแƒ›แƒ“แƒ”. แƒ—แƒฃ แƒ›แƒœแƒ˜แƒจแƒ•แƒœแƒ”แƒšแƒแƒ‘แƒ แƒ“แƒแƒงแƒ”แƒœแƒ”แƒ‘แƒฃแƒšแƒ˜แƒ แƒ แƒแƒ’แƒแƒ แƒช false, แƒ›แƒแƒจแƒ˜แƒœ แƒ’แƒแƒ แƒกแƒ˜ แƒžแƒ˜แƒ แƒ“แƒแƒžแƒ˜แƒ  แƒแƒ‘แƒ แƒฃแƒœแƒ”แƒ‘แƒก แƒ‘แƒ แƒซแƒแƒœแƒ”แƒ‘แƒ”แƒ‘แƒก. แƒกแƒแƒฌแƒงแƒ˜แƒกแƒ˜ แƒ›แƒœแƒ˜แƒจแƒ•แƒœแƒ”แƒšแƒแƒ‘แƒ แƒแƒ แƒ˜แƒก false.

Error codes:

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err5 not found).

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err53 not found).

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err73 not found).

Example:


Sub ExampleShellForWin
    Shell("c:\windows\calc.exe",2)
End Sub

Please support us!