LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Minimize Form


Good afternoon Michael

Use this before your first procedure in the userforms code:

Private Declare Function SetWindowLong& Lib "user32" Alias
"SetWindowLongA" (ByVal hwnd&, ByVal nIndex&, ByVal wNewWord&)
Private Declare Function FindWindow& Lib "user32" Alias "FindWindowA"
(ByVal lpClassName As String, ByVal lpWindowName As String)
Public usrcell As String

and then just add this in to your Userform_Initialize event (or just
add it to the bottom of your code if you don't have one).

Private Sub UserForm_Initialize()
Dim hwnd&
hwnd = FindWindow(vbNullString, Me.Caption)
SetWindowLong hwnd, -16, &H84CA0080
End Sub

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=377685

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimize a form Alvin Hansen[_2_] Excel Programming 8 February 6th 05 01:45 PM
Minimize the VB form FuzzyLogic Excel Programming 0 October 29th 03 04:46 PM
Minimize the VB form FuzzyLogic Excel Programming 0 October 29th 03 04:16 PM
Minimize a form Bruce Roberson Excel Programming 2 August 22nd 03 10:13 PM
How to minimize a form using VB Jean Oct Excel Programming 2 July 28th 03 08:00 PM


All times are GMT +1. The time now is 11:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"