devxlogo

SetPropertyEx – Set a property of multiple controls/objects

SetPropertyEx – Set a property of multiple controls/objects

' Set a property of multiple controls/objects in a single step,'  and return True if successful' Note: requires the SetProperty function'' Example: SetPropertyEx("Text", "OK!!!", TextBox1, Button1, Button2)Function SetPropertyEx(ByVal propertyName As String, ByVal val As Object, _    ByVal ParamArray objs() As Object) As Boolean    Dim obj As Object    Try        For Each obj In objs            SetProperty(obj, propertyName, val)        Next    Catch        Return False    End TryEnd Function

devx-admin

Share the Post: