Consulting

Results 1 to 3 of 3

Thread: Check Label for certain text

  1. #1

    Check Label for certain text

    How can I check if a userform label has a "*" (without quotes)?

  2. #2
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    You could check if character 42 is in the label caption. Something like...

    [vba]If InStr(1, Me.Label1.Caption, Chr(42)) <> 0 then
    'has an asterisk character
    Else
    'does NOT have the character
    End If[/vba]

    HTH

  3. #3
    Thanks Zack :-)

Posting Permissions

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