userform et acces feuille excel

roro69

XLDnaute Impliqué
Re : userform et acces feuille excel

Bonsoir colle ce bout de code qui te permettra de réduire l'usf dans la barre des taches:
Private Declare Function FindWindowA& Lib "User32" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function EnableWindow& Lib "User32" (ByVal hWnd&, ByVal bEnable& )
Private Declare Function GetWindowLongA& Lib "User32" (ByVal hWnd&, ByVal nIndex& )
Private Declare Function SetWindowLongA& Lib "User32" (ByVal hWnd&, ByVal nIndex&, ByVal dwNewLong& )

Private Sub UserForm_Activate()
EnableWindow FindWindowA("XLMAIN", Application.Caption), 1
End Sub

Private Sub UserForm_Initialize()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) Or &H20000
End Sub
A++
 

Statistiques des forums

Discussions
312 295
Messages
2 086 956
Membres
103 404
dernier inscrit
sultan87