Text Documents (Writer)
HTML Documents (Writer Web)
Spreadsheets (Calc)
Presentations (Impress)
Drawings (Draw)
Database Functionality (Base)
Formulae (Math)
Charts and Diagrams
Macros and Scripting
Office Installation
Common Help Topics
OneOffice Logo

Kill Statement

Deletes a file from a disc.

Syntax:


Kill File As String

Parameters:

File: Any string expression that contains an unambiguous file specification. You can also use URL notation.

Error codes:

5 Invalid procedure call

76 Path not found

Example:


Sub ExampleKill
    Kill "C:\Users\ThisUser\datafile.dat" ' File must be created in advance
End Sub