Attribute VB_Name = "Module5"

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
    (ByVal hwnd As Long, _
    ByVal wMsg As Long, _
    ByVal wParam As Long, _
    lParam As Any) As Long
    
Public Declare Function OpenClipboard Lib "user32" _
    (ByVal hwnd As Long) As Long
    
Public Declare Function EmptyClipboard Lib "user32" () As Long

Public Declare Function SetClipboardData Lib "user32" _
    (ByVal wFormat As Long, _
    ByVal hMem As Long) As Long

Public Const CF_TEXT = 1
Public Const WM_USER = &H400&
Public Const TBM_GETTOOLTIPS = (WM_USER + 30)
Public Const TTM_ACTIVATE = (WM_USER + 1)

Public Function PreventSliderToolTips(hwndSlider As Long, bEnabled As Boolean) As Long
On Error Resume Next

Dim hToolTips As Long
 
    hToolTips = SendMessage(hwndSlider, _
    TBM_GETTOOLTIPS, _
    ByVal _
    0&, _
    ByVal 0&)
   
If hToolTips <> 0 Then
   
    PreventSliderToolTips = SendMessage(hToolTips, _
    TTM_ACTIVATE, _
    ByVal Abs(bEnabled), ByVal 0&)
    
End If

End Function


