You know how when you use "&" in a label, it comes out like this - Label1 - Is there anyway to ignore &?
Printable View
You know how when you use "&" in a label, it comes out like this - Label1 - Is there anyway to ignore &?
What is it that you want to do? If you want "&" as a part of the label then use two of them like My&&Label which will appear as My&Label. If you want to print a label like &Label1 without the L being underlined, then use this routine:
Code:Public Function StripAmpersand(sCaption As String) As String
Dim nPos As Integer
Const AMPERSAND = "&"
nPos = InStr(1, sCaption, AMPERSAND)
StripAmpersand = Left(sCaption, nPos - 1) & Right(sCaption, Len(sCaption) - nPos)
End Function
Ok, this is what I mean: When I use the Webbrowser control and make it so that when you drag over a link, it will show you what it is. If it has "&new" in it or whatever, it will underline n. I know how to find it, Instr(label2, "&"), but now, how do I replace it so that there will be two &'s put down?
Try setting the label's UseMnemonic property to False.
Thanks, that is just what I needed.Quote:
Originally posted by BruceG
Try setting the label's UseMnemonic property to False.