Results 1 to 1 of 1

Thread: Lots of Functions to Deal with Controls

  1. #1

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,749

    Lots of Functions to Deal with Controls

    Finding the widest, right-aligning, changing their size to fit the contents of their caption or text, making comboboxes as wide as their widest list entry, etc.

    bControls.zip

    This has some dependencies. Other than the CallStack and ErrorHandler stuff, if you find something in there that has a dependency that's not included then let me know and I'll upload it.

    This is the only one I saw immediately but there may be others.

    Code:
    Public Function MaxValue(ParamArray Values() As Variant) As Variant
    Dim m_CallStacker As New cCallStacker
    Dim n As Long
    Dim nMax As Long
    
    ' Returns the Greatest Value.
    
    m_CallStacker.Add NAME & ".MaxValue(Public Function)"
    
    For n = LBound(Values) To UBound(Values)
    
      If Values(n) > nMax Then nMax = Values(n)
    
    Next n
    
    MaxValue = nMax
    
    End Function
    Last edited by cafeenman; Apr 3rd, 2024 at 06:59 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width