Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7092187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:16:56+00:00 2026-05-28T08:16:56+00:00

As a response to a POST, the server returns very simple JSON object that

  • 0

As a response to a POST, the server returns very simple JSON object that can indicate success or failure of the upload.

The JSON object can be either {config_version:N} to indicate success or {exception:Reason} to indicate failure.

I process the response in the following manner:

json = objHTTP.responseText
Set sc = CreateObject("ScriptControl")
sc.Language = "JScript"
Set o = sc.Eval("(" + json + ")")

On Error GoTo Exception:
' try to use config_version property
Util.SetConfigData "version", o.config_version
Exit Function

Exception:
If o.Exception = "config_not_valid" Then
   ' one kind of exception - do accordingly
Else
   ' another kind of exception
End If

The problem that I am facing is that the VBA Excel 2010 editor is capitalizing o.exception to o.Exception! In the Watch window I see the property exception but cannot access it. How can I force the Editor to stop capitalizing the property name? Is there other syntax for accessing properties in VBA?

EDIT: To better illustrate what is happening here are two screen shots.

enter image description here

As you can see, the o has a property called exception. When trying to access it with o.Exception it triggers the 438 error.

enter image description here

Since I have control over the backend, I changed the response to return {Exception:whatever} (cannot do it permanently). Now VBA has no problem picking the property.

How is this possible if the VBA compiler is case-insensitive as suggested by Jean-François Corbett?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:16:56+00:00Added an answer on May 28, 2026 at 8:16 am

    This is wierd. I can get the lower-case “e” to stick in Tester(), but if I change the declaration of “exception” in Test2() to “Exception”, then the VBE automatically changes changes any instances in Tester() to “Exception”. Changing back to “exception” has the reverse effect.

    Basically you need to make sure you’re not using “Exception” anywhere else in your project.

    Sub Tester()
    
        Dim sc, o
    
        Set sc = CreateObject("ScriptControl")
        sc.Language = "JScript"
        Set o = sc.Eval("({exception:'blahblah'})")
    
        Debug.Print o.exception 'prints blahblah
    
    End Sub
    
    
    Sub Test2()
        Dim exception As String
        exception = "blah"
    End Sub
    

    EDIT:

    If you’re still stuck then you can try it this way, leaving your parsed JSON object in the script control instance:

    Set sc = CreateObject("ScriptControl")
    sc.Language = "JScript"
    
    sc.Eval "var o = eval({exception:'blahblah',message:'oops'})"
    
    Debug.Print sc.Eval("o.exception")     'prints blahblah
    Debug.Print sc.Eval("o['exception']")  'same thing...
    
    Debug.Print sc.Eval("o.message")       'prints oops
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an HTTP server that returns large bodies in response to POST requests
I have a jQuery post function that returns a response on success after the
I'm using Apache HttpComponents Client to POST to a server that returns JSON. The
I have an iframe that: does a post request to server server returns 302
I am making a call to a server which returns a JSON encoded object.
I made this web service that returns a datatable from sql server db. Can
when i click post the post response that i am getting from firefox is:
When I commit to the server this returns: The POST request returned invalid XML
I've got an ajax form that seems to be very varied in its response.
I have an <iframe> that other sites can include so their users can POST

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.