Shell Function

Startar ett annat program och definierar respektive fönsterformat, om det behövs.

Syntax:

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

Parametrar:

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

Fokus placeras på det dolda programfönstret.

Not implemented in LibreOffice.

1

Fokus placeras på programfönstret i standardstorlek.

Not implemented in LibreOffice.

2

Fokus placeras på det minimerade programfönstret.

3

Fokus placeras på det maximerade programfönstret.

4

Programfönster av standardstorlek, utan fokus.

Not implemented in LibreOffice.

6

Minimerat programfönster, fokus är kvar på det aktiva fönstret.

Not implemented in LibreOffice.

10

Helskärmsvisning


note

Windowstyle 3 and 10 are equivalent in Windows systems.


Param

String that specifies additional arguments passed to the program.

bSync

Om det här värdet anges till true, så väntar kommandot Shell och alla LibreOffice-aktiviteter tills skalprocessen är slutförd. Om värdet anges till false returneras skalet direkt. Standardvärdet är false.

Felkoder:

5 Felaktigt proceduranrop

53 Filen hittas inte

73 Inte implementerad

Exempel:


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

Stötta oss!