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

VS 2010 [RESOLVED] Saving a resourced file

$
0
0
Hey guys, Im attempting to grab my excel file embedded in my application and save it at a particular location.

Im trying this with no success:

Code:

        Dim objReader As StreamWriter
        Try
            objReader = New StreamWriter(Filename)
            objReader.Write(My.Resources.template)
            objReader.Close()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

Fixed:

Code:

        Dim Fbyte As Byte() = My.Resources.template
        My.Computer.FileSystem.WriteAllBytes(Filename, Fbyte, False)


Viewing all articles
Browse latest Browse all 27554

Trending Articles



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