Results 1 to 3 of 3

Thread: [RESOLVED] object doesnt support this property or method

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Resolved [RESOLVED] object doesnt support this property or method

    I am currently getting an error on the highlighted line and cannot figure out why. Please advise.

    The error is:
    object doesnt support this property or method
    form code:
    VB Code:
    1. Private Sub Form_Load()
    2.     PageColorScheme Me
    3. End Sub

    module code:
    VB Code:
    1. Option Explicit
    2.  
    3. Public Sub PageColorScheme(frm As Form)
    4.     Dim strBC As String, strFC As String
    5.     Dim ctrl As Control
    6.    
    7.     With frm
    8.         'background color, dark blue
    9.         strBC = RGB(104, 127, 217)
    10.         'foreground color, light blue
    11.         strFC = RGB(214, 223, 247)
    12.        
    13.         'form background color
    14.         .BackColor = strBC
    15.        
    16.         'control forecolors
    17.         For Each ctrl In .Controls
    18.             If TypeOf ctrl Is Shape Then
    19.                 [hl].BorderColor = strFC[/hl]
    20.             End If
    21.         Next
    22.     End With
    23. End Sub

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    UK
    Posts
    417

    Re: object doesnt support this property or method

    Try that should fix the problum

    ctrl.BorderColor = strFC
    When your dreams come true.
    On error resume pulling hair out.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: object doesnt support this property or method

    Quote Originally Posted by dreamvb
    Try that should fix the problum

    ctrl.BorderColor = strFC
    yep, that fixed it. thanks dreamvb

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