Userform to appear on top?

C

capt

How do I get a userform7 to appear on top of userform1 when userform1 is
opened.

I have the following code:

Private Sub CommandButton1_Click()
UserForm1.Show
End Sub
 
J

Jim Cone

Add a button on UserForm1 with code to show UserForm7
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"capt" >
wrote in message
How do I get a userform7 to appear on top of userform1 when userform1 is
opened.
I have the following code:

Private Sub CommandButton1_Click()
UserForm1.Show
End Sub
 
C

capt

Thanks Jim,
I was after for userform7 to appear automatically when userform1 was opened.
The idea is to show operating notes to the users when its opened.
 
J

Jim Cone

Then show UserForm7 first followed by UserForm1 ...

Sub Something
UserForm7.Show
Unload UserForm7
UserForm1.Show
' your code
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



in message
Thanks Jim,
I was after for userform7 to appear automatically when userform1 was opened.
The idea is to show operating notes to the users when its opened.
 
R

Rick Rothstein \(MVP - VB\)

Do you really need another UserForm to do that? What about using a TextBox
(with both the Locked and MultiLine properties set to True) on UserForm1
instead? You could then use Initialize event code similar to this for
UserForm1...

Private Sub UserForm_Initialize()
TextBox1.ZOrder
'....
'.... Your intialize code goes here
'....
TextBox1.Visible = True
End Sub

You can then dismiss the TextBox whenever you want elsewhere in your code
like this...

TextBox1.Visible = False

To make the TextBox stand out, you can set it BackColor property to, say, a
very pale yellow, its BorderStyle property to 1-fmBorderStyleSingle and its
BorderColor property to, say, a dark red.

Rick
 
C

capt

I cant seem to make it work.
There may be another way.
In my userform1, the users will write their names in textbox1. I was after a
note to explain that the name are to be in upper case.
Any Suggestions?
 
D

Dave Peterson

Put a label on the form with the textbox with instructions--or better yet, just
make the string uppercase before you process it.

mycell.value = ucase(me.textbox1.value)

And let the users do whatever they want.
I cant seem to make it work.
There may be another way.
In my userform1, the users will write their names in textbox1. I was after a
note to explain that the name are to be in upper case.
Any Suggestions?
 
Top