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


    If DownloadFile(ie3.locationurl, App.Path) Then
        MsgBox "Download Complete", _
            vbOKOnly Or vbInformation, _
    End If

' Download a file. Return True if we are successful.
Private Function DownloadFile(ByVal source_file As String, ByVal dest_file As String) As Boolean
Dim bytes() As Byte
Dim fnum As Integer

    ' Get the file's contents.
    On Error GoTo DownloadError
    bytes() = Inetftp.OpenURL(source_file, icByteArray)

    ' Remove the file if it exists.
    On Error Resume Next
    Kill dest_file
    On Error GoTo DownloadError

    ' Write the contents into the destination file.
    fnum = FreeFile
    Open dest_file For Binary Access Write As #fnum
    Put #fnum, , bytes()
    Close #fnum

    DownloadFile = True
    Exit Function

    MsgBox "Error " & Err.Number & _
        " downloading file '" & _
        source_file & "' to '" & _
        dest_file & "'." & vbCrLf & Err.Description, _
        vbExclamation Or vbOKOnly, _
        "Download Error"
    DownloadFile = False
    Exit Function
End Function

still searching for the work-around

still pending

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.