Hi, anyone out there with VBA knowledge and how to connect VBA to a Caspio database? I could really do with your help... Ultimately I'd like to automate this using VBA. Here's the VBA code which crashes at the .send line, returning a "Access Denied" error.
Sub GetCaspioData()
Dim hReq As Object, Json As Dictionary
Dim sht As Worksheet
authKey = <myAuthKey>
Set sht = Sheet1
Dim strUrl As String
strUrl = "https://myaccount.caspio.com/ui/apps/myApp/tables/myTable/open"
Set hReq = CreateObject("MSXML2.XMLHTTP")
With hReq
.Open "GET", strUrl, False
.SetRequestHeader "Authorization", "Bearer " & authKey
.Send
End With
Dim response As String
response = hReq.ResponseText
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
RonAnderson
Hi, anyone out there with VBA knowledge and how to connect VBA to a Caspio database? I could really do with your help... Ultimately I'd like to automate this using VBA. Here's the VBA code which crashes at the .send line, returning a "Access Denied" error.
Sub GetCaspioData()
Dim hReq As Object, Json As Dictionary
Dim sht As Worksheet
authKey = <myAuthKey>
Set sht = Sheet1
Dim strUrl As String
strUrl = "https://myaccount.caspio.com/ui/apps/myApp/tables/myTable/open"
Set hReq = CreateObject("MSXML2.XMLHTTP")
With hReq
.Open "GET", strUrl, False
.SetRequestHeader "Authorization", "Bearer " & authKey
.Send
End With
Dim response As String
response = hReq.ResponseText
MsgBox response
End Sub
Many thanks, Ron
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.