HTTPS Secured channel error (1 Viewer)


Registered User.
Local time
Today, 10:27
Nov 25, 2009
I'm using VBA to download files from my domain (A Sub Domain)
I'm getting an error that there is a problem with the secured channel.

This will happen if I try to Download the file using HTTPS address but will not if I use unsecured HTTP addres
The domain do have SSL, and I have no problem seeing the file using the same HTTPS address on the browser.
HTTPS Text File

Public Function fnDownloadHTTP(strTarget As String, strSaveAs As String, Optional strUserName As String, Optional strPassword As String) As Boolean

' On Error GoTo errHere

Dim xmlHTTP As Object
Dim strRespText As String

fnDownloadHTTP = True

'Set xmlHTTP = CreateObject("Microsoft.XMLHTTP")
Set xmlHTTP = CreateObject("MSXML2.ServerXMLHTTP")

With xmlHTTP
.Open "GET", strTarget, False, strUserName, strPassword
.setRequestHeader "cache-control", "no-cache,must revalidate"
End With

If fnSaveDownloadFile(strSaveAs, xmlHTTP.responseBody) = False Then
fnDownloadHTTP = False
End If
Last edited:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 08:27
Jul 9, 2003
Hi smig, May the 4th be with you. I'm bumping your post up the list hoping it gets another look!
Last edited:


Immoderate Moderator
Staff member
Local time
Today, 02:27
Feb 28, 2001
Here is a discussion about using HTTPS via VBA from Excel:

Seems like you have to do something with one of the Windows networking APIs in order to get there.

Here's another take on the problem that explicitly discusses authentication issues with HTTPS sites.

I've never tried either but I found these after a web search. No guarantees, no claims to make. But it is clear you are not alone in what you are trying - and in the difficulties you are having.

Users who are viewing this thread

Top Bottom