Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Location
    Ohio, United States
    Posts
    167

    Unanswered: Forms: Label hyperlinking to code

    I have a form with << and >> as labels in the bottom right. I have them so they'll progress to the previous or next tab on click event and they work but there is no mouseover effect (i.e. the arrow doesn't change to a finger). I tried going about this another way by putting the code in a hyperlink but couldn't see where this would be available apart from a public module. Does anybody know the VBA control to turn on or off the hyperlink effect? Basically I just want it to look like a link. Thanks! Joshua

  2. #2
    Join Date
    Sep 2008
    Location
    NM, USA
    Posts
    97
    If you want to make it look like the label is a hyperlink, i would to into the events tab in the properties window, build an event for "OnMouseMove", and have it change the fore color of the text when you mouse over it. I'd also put in another mouse move even for the detail of the form, so when you move your mouse off of it, the label goes back to normal.

    For Example:
    Code:
    Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Me.Label1.FontBold = True
        Me.Label1.ForeColor = 225
    End Sub
    Code:
    Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Me.Label1.FontBold = False
        Me.Label1.ForeColor = 0
    End Sub
    ^ Something such as this should do the trick for you.
    "Unix is user friendly... It's just very picky about its friends."

    The best things in life...are well-documented.

Posting Permissions

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