Open Statement

Karaa deetaa bani.

Syntax:


Open FileName As String [For Mode] [Access IOMode] [Protected] As [#]FileNumber As Integer [Len = DatasetLength]i37502

Parameters:

FileName: Name and path of the file to open. If you try to read a file that does not exist (Access = Read), an error message appears. If you try to write to a file that does not exist (Access = Write), a new file is created.

Haalata: Jefuraa halata faaayilii ibsuu. Gatii gitaa'aa: Miiltessuu( tartiiba faayiliititti miiltessi),Lamee(deetaa baayitiidhan gahama), naqa( karaa deetaa dubbisuuf banuu), bahaa(karaa deetaa barreessuuf banuu) fi Tasa( faayilii fira ta'an gulaali)

IOMode: Jefuraa akaakuu gahiinsa hiiku. Gatii gataa'aa: Dubbisuu (dubbisuu qofa), Barreessi (Barreessuu qofa), Barreesuu fi dubbisuu (lachuu).

Hayyisa: Jefuraa ittisa haalhojii faayilii erga banamee boodaa. Gatii gataa'aa: Yaagutomaa( faayiliin fayyadamaa biraatiin banamuu danda'a), Cufaa dubbisaa(barreefama faayilii faallaan hayyifame), Cufaa Dubbisuu fi Barreessuu (gahiinsa faayiliin didee)

FileNumber: Himannoon itergaa kamiyyuu 0 hanga 511 karaa bilisaa deetaa agarsiisa.Gahiinsa faayiliitiif ajaja karaa deetaatiin dabarsuu ni dandeessa. Baay'inni faayilii hatattamaan karaa hima banaan dura faankishinii FreeFile jedhuun murtaa'uu qaba.

DatasetLength: Faayiloota gahiinsa tasaatiif, dheerina kuusaa qindeessi.

note

Qabiyyee faayilii isa hima banaadhaan baname qofa fooyyessuu dandeessa.Yoo faayilii banamee ture banuu yaalte ergaa dogogoratu mul'ata.


Example:


Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim sLine As String
Dim aFile As String
Dim sMsg As String
    aFile = "c:\data.txt"
    iNumber = Freefile
    Open aFile For Output As #iNumber
    Maxxansa #iNumber, "Kun Sarara barruuti"
    Print #iNumber, "Kun sarara barruu kan birooti"
    Close #iNumber
    iNumber = Freefile
    Open aFile For Input As iNumber
    While Not eof(iNumber)
        Line Input #iNumber, sLine
        If sLine <>"" Then
            sMsg = sMsg & sLine & chr(13)
        End If
    Wend
    Close #iNumber
    MsgBox sMsg
End Sub

Please support us!