Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbApplication-NOT-Modal
Hi,
Is there anyway to make vbApplicationModal = False...? I have an Excel macro which opens up a message box - when this message box is open, I want the user to be able to use othe Excel workbooks except for the one displaying the message box... There doesn't seem to be a way to do this... for some reason vbApplicationModal seems to be the default, as well as the only option (ie. default is true, and the only option is to set it as true - booyeah!) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbApplication-NOT-Modal
If all your users are using xl2k+, then why not use a userform instead?
k1sr wrote: Hi, Is there anyway to make vbApplicationModal = False...? I have an Excel macro which opens up a message box - when this message box is open, I want the user to be able to use othe Excel workbooks except for the one displaying the message box... There doesn't seem to be a way to do this... for some reason vbApplicationModal seems to be the default, as well as the only option (ie. default is true, and the only option is to set it as true - booyeah!) -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbApplication-NOT-Modal
Hi Dave,
It still seems to be modal - I'm not familiar with User Forms - do I bring up the User From simply with UserForm1.Show or is there another way, as this way leaves me still unable to use other excell worksheets... cheers |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbApplication-NOT-Modal
You can make a UserForm non-modal by using this statement to initially show
it... UserForm1.Show vbModeless Substitute the name of your actual UserForm for the example name UserForm1 that I used. Rick "k1sr" wrote in message ... Hi Dave, It still seems to be modal - I'm not familiar with User Forms - do I bring up the User From simply with UserForm1.Show or is there another way, as this way leaves me still unable to use other excell worksheets... cheers |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbApplication-NOT-Modal
By default user forms open modal, so use the following method to open it
non-modal UserForm1.Show (0) -- Regards, Nigel "k1sr" wrote in message ... Hi Dave, It still seems to be modal - I'm not familiar with User Forms - do I bring up the User From simply with UserForm1.Show or is there another way, as this way leaves me still unable to use other excell worksheets... cheers |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbApplication-NOT-Modal
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbApplication-NOT-Modal
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 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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 |