1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
Private Declare Function ShellExecute _
Lib "shell32.dll" _
Alias "ShellExecuteA" ( _
ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Sub LblFond_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'remet le Label qui contient le lien normal (non souligné et en noir)
LblLien.ForeColor = &H80000012
LblLien.Font.Underline = False
End Sub
Private Sub LblLien_Click()
'adapter l'adresse du lien
ShellExecute 0, "open", "https://www.developpez.net/forums/f664/logiciels/microsoft-office/excel/macros-vba-excel/", "", "", 1
End Sub
Private Sub LblLien_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'souligne et colore en bleu
LblLien.Font.Underline = True
LblLien.ForeColor = &H8000000D
End Sub
Private Sub UserForm_Initialize()
'charge l'icône en forme de main qu'il est facile de se procurer sur internet (.ico ou .cur)
LblLien.MousePointer = fmMousePointerCustom
LblLien.MouseIcon = LoadPicture(ThisWorkbook.Path & "\" & "main.ico")
End Sub |
Partager