Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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
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
ActiveWindow.Visible = True Paulo Alexandre ( PT ) Excel Programming 5 September 29th 06 12:02 PM
Passing focus to another application Fred Excel Programming 2 August 29th 06 03:43 AM
Shapes.visible = false/true Ctech[_122_] Excel Programming 2 March 22nd 06 02:25 PM
how to set pivotitem.visible property to true kanan Excel Programming 0 February 25th 04 08:06 PM
How can I set PivotItem.Visible property to True? yumi Excel Programming 2 February 19th 04 11:51 AM


All times are GMT +1. The time now is 01:55 PM.

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"