How can I made an hyperLink label, but the link is to other function and not to the internet.
Printable View
How can I made an hyperLink label, but the link is to other function and not to the internet.
Use the ShellExecute api function.
This will open up any program that the exe is assosiated with.Code: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
Public Const SW_SHOWNORMAL = 1
Usage
ShellExecute Me.hwnd, vbNullString, "C:\prog.exe", _
vbNullString, "c:\", SW_SHOWNORMAL
'Me.hwnd, "find", "C:\prog.exe", _
'vbNullString, "c:\", SW_SHOWNORMAL
'Me.hwnd, "open", "C:\prog.exe", _
'vbNullString, "c:\", SW_SHOWNORMAL
'Me.hwnd, "print", "C:\prog.exe", _
'vbNullString, "c:\", SW_SHOWNORMAL
'etc.
'etc.