[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

minimizing userforms

Posted on 2001-06-16
11
Medium Priority
?
274 Views
Last Modified: 2010-05-02
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
0
Comment
Question by:jcherry_99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6198587
Is there something like...

Form1.Windowstate = 0

Or

Form1.Windowstate = 1

Or

Unload Form1?

Where Form1 is the name of the form?
0
 
LVL 4

Expert Comment

by:wileecoy
ID: 6198804
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.
0
 

Author Comment

by:jcherry_99
ID: 6199045
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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6199726
Is it possible to post some code you use for?
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6199732
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.
0
 

Author Comment

by:jcherry_99
ID: 6199864
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
0
 

Author Comment

by:jcherry_99
ID: 6199871
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
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6200027
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.



0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 150 total points
ID: 6200040
For the maximising part, youmay have to do some trial and error thing to maximise your app.

You could do something like:

Me.Move 0, 0, 13000, 9000

If 13000 is the screen's width and 9000 is the screen's height.

Another RADICAL (use it if you're really desperate for it), really really RADICAL option would be to add a little button with a caption or some sort of indication that it's to minimise the form.

Upon clicking that button, the form would shrink (Me.Move 0, 0, 30, 30 - I measured it) until only the title bar and a little bit of the form could be seen.  Of course, the button would have to me Top=0 and Left=0 and has to be a small size.  Upon clicking the button again, make the form back to it's original height.  Remember about changing the caption part upon clicking.

As for me, I couldn't find any other method (I use Word 97 also ;) ) which is similar to shrinking the form to the taskbar.

That's it!

glass cookie : )
0
 

Author Comment

by:jcherry_99
ID: 6214323
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.
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6214864
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.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question