Link to home
Start Free TrialLog in
Avatar of jcherry_99
jcherry_99

asked on

minimizing userforms

I know this is a simple question but I cannot find an answer anywhere.

I want a userform to have the three standard options that all forms have (Minimize - change the amount occupied in a screen -- and close). Word 97 says you should be able to do this. All forms are supplied with this they say. Trouble is I cannot make it happen and there are no directions anywhere. Does anyone know how to do this?

If I succeed, will I be able to move around on the document that called the form? (Will the form now be modeless which is the actual object of my question)

Thank you so much

jcherry_99@yahoo.com
Avatar of glass_cookie
glass_cookie

Is there something like...

Form1.Windowstate = 0

Or

Form1.Windowstate = 1

Or

Unload Form1?

Where Form1 is the name of the form?
A simple solution would be to see if your form has the BorderStyle set to something other than 2.

0 - None (no border at all)
1 - Fixed Single (no minimize, maximize, but has "X")
2 - Sizable (all 3 options)
3 - Fixed Dialog (no minimize, maximize, but has "X")
4 - Fixed Tool Window (no minimize, maximize, but has "X")
5 - Sizable Tool Window (no minimize, maximize, but has "X")

hth.
Avatar of jcherry_99

ASKER

These solutions look correct,but word 97 does not have the ability to go beyond window 1. Is there some way I can force it to give window2 sizable.

Thank you so much.

Jerome
Is it possible to post some code you use for?
I think you are asking about Word - Macros.

So, could you try this:

ThisDocument.ActiveWindow.WindowState = wdWindowStateMaximize

ThisDocument.ActiveWindow.WindowState = wdWindowStateMinimize

like that.

Is it, this one, you are asking for?

Cheers.
Dear Valli

You have the right idea. That would be the code if I could use it. The problem is that word 97 will not accept it as valid code. I want to minimize a user form so it has to be userform rather than activedocument.

Or have I misread something? (Active window is not an option after userform for userforms in Word 97) .

Thank you so much

Jerome
Dear Glass Cookie
See the previous comment. It has to be a little more indirect, because Word 97 only allows you to go to state 1. State 2 is what I want ideally, but no can do.

Jerome
I hope, you could not have a control box, for Userform, since it appears to be a dialog box interface like form, if I understood.

See this link:
http://www.microsoft.com/officedev/articles/Opg/001/001.htm

I just tried. You could use UserForm1.Hide and another button, may be in the document, with UserForm1.Show.

You could also, try UserForm1.Height and UserForm1.Width properties, as you require.

Hope this helps.



ASKER CERTIFIED SOLUTION
Avatar of glass_cookie
glass_cookie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The problem is that this is still a modal form even if it is shrunk. It really has to go to the taskbar not to be modal. Damn too bad. It makes my application hopeless.

Take good care

Jerome

Ps I'll award the points.
you tried Hide and Show methods, also? I tried, it worked, with Hide method, and a Command button to Show it, in Word '97. The userform is not in taskbar. If I had understood properly...

Cheers.