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

I've programmed a Form in Excel 1997. When the form is activated for
data entry, it takes up the entire screen with the excel workbook
behind the scenes. Someone asked me if there was a way they could
"minimize" the Form so they can work on other applications, multi-task.
To work on other applications, they currently have to exit the Form by
clicking on the red X in the upper right hand corner of the Form. This
shuts down the form completely.

Is there a way I can program the Form to be minimized, just like I
might minimize Microsoft Word so I can work on something else? I don't
want to have to shut down the form to work with other software.
Ideally, I'd like to be able to easily toggle from my Form to any other
open application. I'd also like to toggle from an open application,
like Word, to my Form.

Any assistance you can provide would be greatly appreciated. Thanks.

Michael

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Minimize Form

One doesn't have to minimize a XL form to work with other applications.
And, one cannot work with XL97 while a form is displayed, minimized or
otherwise.

To switch to another application use the Windows taskbar. By default
it is at the bottom of the screen. or use ALT+TAB to cycle through all
running applications.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article .com,
says...
I've programmed a Form in Excel 1997. When the form is activated for
data entry, it takes up the entire screen with the excel workbook
behind the scenes. Someone asked me if there was a way they could
"minimize" the Form so they can work on other applications, multi-task.
To work on other applications, they currently have to exit the Form by
clicking on the red X in the upper right hand corner of the Form. This
shuts down the form completely.

Is there a way I can program the Form to be minimized, just like I
might minimize Microsoft Word so I can work on something else? I don't
want to have to shut down the form to work with other software.
Ideally, I'd like to be able to easily toggle from my Form to any other
open application. I'd also like to toggle from an open application,
like Word, to my Form.

Any assistance you can provide would be greatly appreciated. Thanks.

Michael


  #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

Reply
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 06:37 AM.

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

About Us

"It's about Microsoft Excel"