Userform toujours visible en bas à droite
Bonjour,
Avez-vous un code pour placer un Userform en bas à droite de l'écran ? et qu'il soit toujours visible !
Mon code s’exécute sous EXCEL mais je pilote WORD et j'ai besoin que mon userform NON MODAL soit au dessus de WORD.
Mon code ne fonctionne pas très bien, et pas bien du tout avec XL2016 et W10
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Private Sub UserForm_Initialize()
Stop_Macro = False
mlHwnd = FindWindow("ThunderDFrame", Me.caption) 'Change to match your userforms caption
Do While mlHwnd = 0
mlHwnd = FindWindow("ThunderDFrame", Me.caption) 'Change to match your userforms caption
DoEvents
Loop
positionH = application.Height - Me.Height
positionW = application.Width - Me.Width
Me.Left = positionW
Me.Top = positionH
SetWindowPos mlHwnd, -1, 0, 0, 0, 0, &H2 Or &H1
End Sub |