Results 1 to 3 of 3

Thread: Clearing Label Captions

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    Clearing Label Captions

    Hello
    I have a Frame Control on my form, in which i have put 7 lables, I want to clear all these lables by a single click, please help me.

    P.S. There are many lables on the form too, but i want to clear the lables in the FRAME.

    Thanks in advance
    Farooq

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Clearing Label Captions

    VB Code:
    1. Private Sub Command1_Click()
    2.     Dim ctl As Control
    3.     For Each ctl In Me.Controls
    4.         If TypeOf ctl Is Label Then
    5.             If ctl.Container Is Frame1 Then ctl.Caption = vbNullString
    6.         End If
    7.     Next ctl
    8. End Sub

  3. #3
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Clearing Label Captions

    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    CS

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