API - UserForm - Excelfenster...[ZIP, 50 KB]
Code gehört in Modul1:
Option Explicit
Sub UF_Show()
UserForm1.Show 0
End Sub
Code gehört in das Klassenmodul UserForm:
Option Explicit
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function BringWindowToTop Lib "user32.dll" _
(ByVal hwnd As Long) As Long
Private Sub CommandButton1_Click()
Dim lngTMP As Long
lngTMP = FindWindow("XLMAIN", vbNullString)
BringWindowToTop lngTMP
End Sub