Syntax
Public Function OpenFile(ByRef FileName As Variant, openType As ENUM_FILE_MODE) As String
Description
This function is used to open specifica file to be processed according to open type value.
Parameters
Key | Description |
FileName | Path and name of the file to be opened, value of type String |
openType | Processed mode , value of typeENUM_FILE_MODE. |
Return value
Returns empty string if the file has been opened else it will return the “File already open” in case the file is already open and the OpenType was FILE_OUTPUT/ FILE_APPEND , in case the OpenType was FILE_INPUT and file dose not exist it will return “File not found”
Sample
Public Sub main() ' Open or Create File and write Data , finally Close it Dim fileName Dim fileMode fileMode = FILE_APPEND fileName = "C:VertexWorld.txt" OpenFile fileName, CInt(fileMode) FileWrite "Welcome TO VertexFx World" CloseFile End Sub
See Also