Fix VBA Shopify API Update Function

Looking for a VBA / HTTPS guru who can troubleshoot our simple function which aims to update a product on Shopify using JSON.

We already have this feature working in PHP so we know we have correct credential, url values.

This is what we have so far, the open method triggers an error "Invalid procedure call or argument".

Public Function sfyExec()

Dim sAPI_KEY As String

Dim sPASSWORD As String

Dim sSTORE_URL As String

Dim sTargetURL As String


Dim sData As String

Dim HTTPReq As Object

sAPI_KEY = "xxxxxxxx"

sPASSWORD = "xxxxxxx"

sSTORE_URL = "xxxxxxx"


sTargetURL = "https://" & sAPI_KEY & ":" & sPASSWORD & "@" & sSTORE_URL & "/admin/products/" & sTESTPRODUCTNUMBER & ".json"

sData = "{product: {""id"": 5961033925, ""body_html"": ""<h1>...penguin...</h1>""}}"

Set HTTPReq = CreateObject("WinHttp.WinHttpRequest.5.1")

[url removed, login to view](4) = 13056 ' The actual value for [url removed, login to view](WinHttpRequestOption_SslErrorIgnoreFlags) that I have set to 13056 (hexadecimal 0x3300) is an addition of all switches found at the WinHttpRequestOption documentation at WinHttpRequestOption_SslErrorIgnoreFlags.

[url removed, login to view] "PUT", TargetURL, False

[url removed, login to view] sAPI_KEY, sPASSWORD, 0

[url removed, login to view] "Content-Type", "application/json"

[url removed, login to view] "Accept", "application/json"

[url removed, login to view] (sData)

MsgBox ([url removed, login to view])

End Function

Skills: JSON, Microsoft Access, Software Architecture

See more: vba fix function, update links excel using vba, update data close workbook vba, vba fix project windows, api ftp vba, update function shell script, google maps api windowjs timingtimer fix, vba fix picture, update sql table excel vba, function access 2007 vba, update user account excel vba active directory, function cut paste vba, asp update function, update code project excel vba, api design vba

About the Employer:
( 25 reviews ) Solihull, United Kingdom

Project ID: #12525678

Awarded to:


Hello, I have a lot of experience with VBA and Excel and I believe I could help you with this one. Please contact me for more information.

$35 USD in 1 day
(10 Reviews)

4 freelancers are bidding on average $36 for this job


I'm PHP and VBA expert with many completed projects that's why I'm sure you'll be impressed with my work. I can help you if you show me working PHP script and let me run it couple of times (may be I'll not need to r More

$35 USD in 0 days
(153 Reviews)
$50 USD in 2 days
(30 Reviews)

Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have c More

$25 USD in 1 day
(0 Reviews)

I have a large experience in vba and knowledges about json. You can try with me and i think i can do it

$25 USD in 1 day
(0 Reviews)