I have a pushbutton in calc I want to be disabled when sheet is opened . To set the property when designing is not a problem. Then when I go in the macro to check status of property and manipulate it I get an runtime error “Sub-procedure or function procedure not defined.” What is missing.
Sub ADTButton_Off
REM ***** BASIC *****
Dim ofForm As Object
Dim ocControl As Object
Dim oCollection As Object
Set ofForm = Forms("ATDButton_form")
Set ocControl = ofForm.Controls(0)
If ocControl.hasProperty("ENABLED" , True) Then
ocControl.setProperty("ENABLED", False)
End If
End Sub