Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB7
Expertise: Intermediate
Oct 6, 2003

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 Try
End Function
Marco Bellinaso
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap