This may not be exactly what you are looking for, but give this a shot.
Use these Imports
Imports System
Imports System.Net
Imports System.ComponentModel
Place inside of the form class where you have the webbrowser control, where 'WebBrowser1' is the name of your WebBrowser Control
Private WithEvents downloadClient As WebClient
Private Sub WebBrowser1_Navigating(sender As Object, e As WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
If e.Url.Segments(e.Url.Segments.Length - 1).EndsWith("xlsx") Then
e.Cancel = True
Dim filepath As String
Dim sd As New SaveFileDialog()
sd.Filter = "Excel Workbook Files|*.xlsx"
sd.FileName = e.Url.Segments(e.Url.Segments.Length - 1)
If sd.ShowDialog() = DialogResult.OK Then
filepath = sd.FileName
downloadClient = New WebClient
downloadClient.DownloadFileAsync(e.Url, filepath)
Me.Text = filepath
End If
sd.Dispose()
End If
End Sub
Private Sub downloadClient_DownloadFileCompleted(sender As Object, e As AsyncCompletedEventArgs) Handles downloadClient.DownloadFileCompleted
MsgBox("File Downloaded - a")
End Sub
Private Sub downloadClient_DownloadProgressChanged(sender As Object, e As DownloadProgressChangedEventArgs) Handles downloadClient.DownloadProgressChanged
ProgressBar1.Maximum = e.TotalBytesToReceive
ProgressBar1.Value = e.BytesReceived
Application.DoEvents()
End Sub
source that i found is in c#(marked as selected answer):
https://stackoverflow.com/questions/15419632/download-a-file-through-the-webbrowser-control
Edit... Noticed a small error in which I forgot to initialize the WebClient Object
Edit 2... Have to use DownloadFileAsync so you can use UI updates in case you want to show a progress dialog of some sort. Also, added a progressbar example.