Ok this (much smaller) code does what you want. Yes, this little amount of code is all of it!

Private Const SW_SHOWMAXIMIZED = 3
Private Const WS_MAXIMIZEBOX = &H10000
Private Declare Function IsWindowVisible& Lib "user32" (ByVal hwnd As Long)
Private Declare Function ShowWindow& Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long)
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const GWL_STYLE = (-16)
Private Sub Form_Load()
Dim WinHwnd As Long
Dim WindowAttributes As Long
Do
WinHwnd = FindWindowEx(0, WinHwnd, vbNullString, vbNullString)
WindowAttributes = GetWindowLong(WinHwnd, GWL_STYLE)
If (WindowAttributes And WS_MAXIMIZEBOX) = WS_MAXIMIZEBOX And IsWindowVisible(WinHwnd) <> 0 Then
Call ShowWindow(WinHwnd, SW_SHOWMAXIMIZED)
End If
Loop Until WinHwnd = 0
End Sub