Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Modal User Form

I am trying to design a user form to function as a "Accept
our Terms" form the first time someone opens the file. I
have the ShowModal Property of the form set to True and
use the following code to load the form:

Sub Auto_Open()

If NotAccepted Then frmAgree.Show (vbApplicationModal)

The form loads OK but you can then click on the underlying
worksheet and work normally with the user form still
open. Shouldn't this force the user form to have to be
closed before the worksheet can be accessed?

Thanks
Jim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Modal User Form

Jim,

You are using the wrong constant. The two constants for the modality of
forms are vbModal and vbModeless. The value of vbModeless and the value of
vbApplicationModal are the same, so your code is showing the form
modelessly.

Change vbApplicationModal to vbModal.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Jim M" wrote in message
...
I am trying to design a user form to function as a "Accept
our Terms" form the first time someone opens the file. I
have the ShowModal Property of the form set to True and
use the following code to load the form:

Sub Auto_Open()

If NotAccepted Then frmAgree.Show (vbApplicationModal)

The form loads OK but you can then click on the underlying
worksheet and work normally with the user form still
open. Shouldn't this force the user form to have to be
closed before the worksheet can be accessed?

Thanks
Jim



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
Userform modal Dave K[_3_] Excel Discussion (Misc queries) 1 April 9th 10 07:41 AM
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
Mode - getting bi- and multi-modal results?? Jdolsak Excel Worksheet Functions 5 March 15th 06 12:04 AM
Forms that are modal in 97 are not modal in 2003 Old Car Excel Discussion (Misc queries) 1 April 27th 05 08:25 AM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 06:50 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"