Sub HideBar(frm As Object)
#If VBA7 Then
Dim Style As LongPtr, Menu As Long, hWndForm As LongPtr
#Else
Dim Style As Long, Menu As Long, hWndForm As Long
#End If
'une classe de UserForm est de type ThunderXFrame ou ThunderDFrame (selon version)
hWndForm = FindWindow("Thunder" & IIf(Application.Version Like "8*", "X", "D") & "Frame", Me.Caption)
Style = GetWindowLong(hWndForm, GWL_STYLE)
Style = Style And Not WS_CAPTION
SetWindowLong hWndForm, GWL_STYLE, Style
DrawMenuBar hWndForm
End Sub
Private Sub Label1_Click()
End Sub
Private Sub UserForm_Activate()
HideBar Me
' Récupération de l'heure d'affichage de la BdD
TimeDebut = Timer
' Donne la main à excel pour facilité l'affichage de la BdD
DoEvents
' Boucle tant que 2 secondes ne se sont pas écoulé
While Timer < TimeDebut + 1
Wend
' Fermeture de la BdD
Unload Me
End Sub