You can use this API method to read properties of a data source or a workbook. The command returns a Boolean value: True or False.
To call the method, use Application.Run and specify the following input parameters:
Enter one of the following properties:
Enter the formula alias for the data source. You can set the alias when configuring the data source on the Components tab in the design panel. This parameter is optional.
If you use the HasChangedPlanData or LastError property, you should not enter a data source alias, as this property is not related to a specific data source but to the complete workbook.
Dim lResult As Variant
lResult= Application.Run("SAPGetProperty", "IsDataSourceEditable", "DS_1")
If you execute the command, it returns the Boolean value. If the data source DS_1 is editable, the value is True.
Iret = Application.Run("SAPGetProperty", "IsConnected", "DS_1")
If you execute the command, it returns the Boolean value. If the data source DS_1 is connected, the value is True.