Q:

VBA Commands incompatible between Excel 2010 and 2013 (OLEObject)?

I have an Excel macro file shared across some users, all with Excel 2010 version. We are trying to have it run with some people with Excel 2013, but the macro seems to block everytime we need to call some OLEObjects (mainly buttons and checkboxes) with the following error message:
Run-time error '1004':
Unable to get the Object property of the OLEObject class

These are three code samples that trigger the error:
1:
If Not (ThisWorkbook.Sheets("Main page").OLEObjects("CheckBox2").Object.Value) Then

2:
If ThisWorkbook.Sheets("Main page").OLEObjects("OptionButton3").Object.Value Then

3:
variableName = mPage.OLEObjects("OptionButton5").Object.Value

I'm not an expert in VBA but I wrote part of the macro myself, so I may be able to modify the macro if the button Objects just need to be accessed in a different way in the newest versions.

A:

Check out the Shapes object. Maybe you have shapes and no OLEObjects.
Debug.Print ThisWorkbook.Sheets("Main page").Shapes("Check Box 2").OLEFormat.Object.Value

You can test it with
Debug.Print ThisWorkbook.Sheets("Main page").Shapes.Count
Debug.Print ThisWorkbook.Sheets("Main page").OLEObjects.Count

