Bonjour a tous j'ai un code que je met sur mes USerform pour masquer l'aplication et uniquement le Userform apparait le probleme est que j'aimerais que le Userform s'ouvre en bas de page pas au centre de mon ecran ...
aucune idee quoi modifier merci ! :
aucune idee quoi modifier merci ! :
Code:
' ------------------------------MASQUAGE DE LA FEUIL A L'OUVERTURE (rajouter aussi Dna this Worbook) ------------------
Private Declare Function FindWindow _
Lib "user32" _
Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function EnableWindow _
Lib "user32" ( _
ByVal hWnd As Long, _
ByVal fEnable As Long) As Long
Private Declare Function ShowWindow _
Lib "user32" ( _
ByVal hWnd As Long, _
ByVal nCmdShow As Long) As Long
Private Declare Function SetWindowLong _
Lib "user32" _
Alias "SetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong _
Lib "user32" _
Alias "GetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Private Sub UserForm_Activate()
Dim hWnd As Long
hWnd = FindWindow(vbNullString, Me.Caption)
EnableWindow FindWindow(vbNullString, Application.Caption), True
ShowWindow hWnd, 0
SetWindowLong hWnd, -20, GetWindowLong(hWnd, -20) Or &H4000
Me.Repaint
ShowWindow hWnd, 5
Application.Visible = True 'METTRE EN FALSE QUAND TOUT EST OK