Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 14 September 2020 12:41 PM


 Public Function OpenFile(ByRef FileName As Variant, openType As ENUM_FILE_MODE) As String


This function is used to open specific a file to be processed according to open type value. 


Key Description 
FileName Path and name of the file to be opened, value of type String
openType Processed mode , value of type ENUM_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"


 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"

 End Sub

See Also

Back to VTL Client Script Index

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions