Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27514

[RESOLVED] Why am I getting this error?

$
0
0
Attachment 98455

Code:

    Private Sub createfile()

        Dim oFile As System.IO.File
        Dim oWrite As System.IO.StreamWriter
        Dim oRead As System.IO.StreamReader

        fileName = DateTime.Now.Year & "_" & DateTime.Now.Month & "_" & DateTime.Now.Day & "_" & _
            DateTime.Now.Hour & "-" & DateTime.Now.Minute & "-" & DateTime.Now.Second & _
            ".txt"

        MsgBox(filePath & fileName)

        oWrite = oFile.CreateText(filePath & fileName)

        oWrite.Close()
    End Sub



    Private Sub writeToFile(ByVal keys As String)

        Dim oFile As System.IO.File
        Dim oWrite As System.IO.StreamWriter
        Dim oRead As System.IO.StreamReader

        oRead = oFile.OpenText(filePath & fileName)

        oWrite.WriteLine(keys)

        oWrite.Close()

    End Sub

Attached Images
 

Viewing all articles
Browse latest Browse all 27514

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>