Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   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



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
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 03:43 AM.

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"