Private Function ShowPic() Dim bytedata() As Byte Dim destfile As Integer Dim file As String Dim filelen As Long Dim numlock As Integer Dim leftover As Long Dim i As Integer Const blocksize = 100000 file = App.Path & "/mypic/Book1.xls" destfile = FreeFile Open file For Binary As destfile filelen = LOF(destfile) numlock = filelen / blocksize leftover = filelen Mod blocksize bytedata() = RES(0).GetChunk(leftover) Put destfile, , bytedata() For i = 1 To numlock bytedata() = RES(0).GetChunk(blocksize) Put destfile, , bytedata() Next i Close destfile End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)