LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default vbApplication-NOT-Modal

THanks Rick,

I'm not sure that that's what I'm after...

Say I've got 2 workbooks open - WBK1 and WBK2

In WBK1 I do somethin to bring up a message box or user form, I want WBK1 to
remain modal, whereas WBK2 is modeless...

In short, access to WBK1 is blocked, however the user can access WBK2

Cheers

"Rick Rothstein (MVP - VB)" wrote:

You could use this Workbook_SheetActivate code as a guide. First, it hides
the UserForm and then, depending on which worksheet is selected, it shows
the UserForm as either modal or modeless.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
UserForm1.Hide
If Sh.Name = "Sheet1" Then
UserForm1.Show
Else
UserForm1.Show vbModeless
End If
End Sub

By expanding this into an If-ElseIf-Else-EndIf structure, you can even
choose not to show the UserForm for some sheets, show it modal for others
and show it modeless for still others.

Rick


"k1sr" wrote in message
...
Thanks guys...

Is there any way to keep that worksheet modal, such that the application
and
other workbooks/worksheets are freed up and can be used but the initial
worksheet cannot...

Maybe I just want too much...

Cheers



 
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
Forms that are modal in 97 are not modal in 2003 Old Car Excel Discussion (Misc queries) 1 April 27th 05 08:25 AM
Forms that are modal in 97 are not modal in 2003 Old Car Excel Programming 1 April 27th 05 08:25 AM
MODAL vs. NonMODAL JimP Excel Programming 5 November 18th 04 01:21 PM
Non-Modal InputBox? NooK[_38_] Excel Programming 3 July 9th 04 04:58 PM
Modal oddity Ken McLennan[_3_] Excel Programming 2 May 27th 04 06:49 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"