Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.Visible = True and focus
Here's one for you..
I've got a modeless userform firing up after a 'Application.Visible = False'. Because I want to get into the code and continue editing I've added a 'view worksheet' button to the form that does a 'Application.Visible = True'. All is well.. ...except that the worksheet is behind the userform and won't take focus and come to the front. How can I get the two windows to behave normally ie when you click on one it takes focus and comes to the front? tia, Hughie |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.Visible = True and focus
Try showing your form vbModeless
I've got a modeless userform firing up... I thought I mentioned that it IS modeless. H |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.Visible = True and focus
Hughie,
This works for me as expected: <Worksheet code Private Sub CommandButton1_Click() UserForm1.Show vbModeless End Sub </Worksheet code <Userform code Private Sub cmdHideExcel_Click() Application.Visible = False End Sub Private Sub cmdShowExcel_Click() Application.Visible = True End Sub </Userform code But the worksheet will always be behind the userform, although you can still interact with the WS; Excel is designed that way. You can .Hide the userform if you do not want it visible, but still loaded. NickHK "hughie" wrote in message oups.com... Here's one for you.. I've got a modeless userform firing up after a 'Application.Visible = False'. Because I want to get into the code and continue editing I've added a 'view worksheet' button to the form that does a 'Application.Visible = True'. All is well.. ..except that the worksheet is behind the userform and won't take focus and come to the front. How can I get the two windows to behave normally ie when you click on one it takes focus and comes to the front? tia, Hughie |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application.Visible = True and focus
This works for me as expected:
But the worksheet will always be behind the userform, although you can still interact with the WS; Excel is designed that way. You can .Hide the userform if you do not want it visible, but still loaded. Oh I see. You might expect it but I didn't (arf!). I had put in a ..hide in any case. thanks for help :) Hughie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveWindow.Visible = True | Excel Programming | |||
Passing focus to another application | Excel Programming | |||
Shapes.visible = false/true | Excel Programming | |||
how to set pivotitem.visible property to true | Excel Programming | |||
How can I set PivotItem.Visible property to True? | Excel Programming |