vb:error 424 object required while downloading file (a pdf file location) to app.path

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2009
Posts: 10
Reputation: lalchetian is an unknown quantity at this point 
Solved Threads: 0
lalchetian lalchetian is offline Offline
Newbie Poster

vb:error 424 object required while downloading file (a pdf file location) to app.path

 
0
  #1
May 10th, 2009
when excecuted it gives an error 424 object required
what i intend to do is download a pdf file to a location in my pc

  1. DoEvents
  2.  
  3. If DownloadFile(ie3.locationurl, App.Path) Then
  4. MsgBox "Download Complete", _
  5. vbOKOnly Or vbInformation, _
  6. "Done"
  7. End If
  8.  
  9.  
  10. ' Download a file. Return True if we are successful.
  11. Private Function DownloadFile(ByVal source_file As String, ByVal dest_file As String) As Boolean
  12. Dim bytes() As Byte
  13. Dim fnum As Integer
  14.  
  15. ' Get the file's contents.
  16. On Error GoTo DownloadError
  17. bytes() = Inetftp.OpenURL(source_file, icByteArray)
  18.  
  19. ' Remove the file if it exists.
  20. On Error Resume Next
  21. Kill dest_file
  22. On Error GoTo DownloadError
  23.  
  24. ' Write the contents into the destination file.
  25. fnum = FreeFile
  26. Open dest_file For Binary Access Write As #fnum
  27. Put #fnum, , bytes()
  28. Close #fnum
  29.  
  30. DownloadFile = True
  31. Exit Function
  32.  
  33. DownloadError:
  34. MsgBox "Error " & Err.Number & _
  35. " downloading file '" & _
  36. source_file & "' to '" & _
  37. dest_file & "'." & vbCrLf & Err.Description, _
  38. vbExclamation Or vbOKOnly, _
  39. "Download Error"
  40. DownloadFile = False
  41. Exit Function
  42. End Function
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 10
Reputation: lalchetian is an unknown quantity at this point 
Solved Threads: 0
lalchetian lalchetian is offline Offline
Newbie Poster

Re: vb:error 424 object required while downloading file (a pdf file location) to app.path

 
0
  #2
May 12th, 2009
still searching for the work-around
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 10
Reputation: lalchetian is an unknown quantity at this point 
Solved Threads: 0
lalchetian lalchetian is offline Offline
Newbie Poster

Re: vb:error 424 object required while downloading file (a pdf file location) to app.path

 
0
  #3
May 25th, 2009
still pending
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC