Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Forms that are modal in 97 are not modal in 2003 | Excel Discussion (Misc queries) | |||
Forms that are modal in 97 are not modal in 2003 | Excel Programming | |||
MODAL vs. NonMODAL | Excel Programming | |||
Non-Modal InputBox? | Excel Programming | |||
Modal oddity | Excel Programming |