Prevent Window Resize Or Moving Revisited 
Author Message
 Prevent Window Resize Or Moving Revisited

Let me restate what I am trying to accomplish.  I need to prevent the
Excel window from being resized when the Excel title bar is
double clicked.  Clicking Tools, Protection, Protect Workbook and
checking Structures and Windows does not do this.

One suggestion that looked like it might work was the following code:
    ActiveWindow.EnableResize = False
Unfortunately, this does not accomplish what I am trying to do.

I think this might require a call to the windows API.  If anyone is
familiar enough with the Windows API, I would greatly appreciate any
suggestions on code that might accomplish the disabling of window resize
when the Excel title bar is double clicked.  Thanks in advance.

Regards
Hector J. Lara



Wed, 18 Jun 1902 08:00:00 GMT  
 Prevent Window Resize Or Moving Revisited
Hi Hector,

It's not quite what you're looking for, but there's a KB article describing
how to create application level event handlers.

XL97: How to Create Application Level Event Handlers
Article ID: Q158244

The given example is the WindowResize event, which is on the same lines as
your problem.

HTH,

    Nick

--
Nick Manton
Chemistry & Chemical Engineering Labs.
SRI International, Menlo Park, CA

Quote:

>Let me restate what I am trying to accomplish.  I need to prevent the
>Excel window from being resized when the Excel title bar is
>double clicked.  Clicking Tools, Protection, Protect Workbook and
>checking Structures and Windows does not do this.

>One suggestion that looked like it might work was the following code:
>    ActiveWindow.EnableResize = False
>Unfortunately, this does not accomplish what I am trying to do.

>I think this might require a call to the windows API.  If anyone is
>familiar enough with the Windows API, I would greatly appreciate any
>suggestions on code that might accomplish the disabling of window resize
>when the Excel title bar is double clicked.  Thanks in advance.

>Regards
>Hector J. Lara



Wed, 18 Jun 1902 08:00:00 GMT  
 Prevent Window Resize Or Moving Revisited
"...Clicking Tools, Protection, Protect Workbook and
checking Structures and Windows does not do this..."

In what way does this not work? by design, clicking the Windows checkbox in
this protect workbook dialog does exactly this. Perhaps there's a macro
which runs which undoes this??

Quote:

>Let me restate what I am trying to accomplish.  I need to prevent the
>Excel window from being resized when the Excel title bar is
>double clicked.  Clicking Tools, Protection, Protect Workbook and
>checking Structures and Windows does not do this.

>One suggestion that looked like it might work was the following code:
>    ActiveWindow.EnableResize = False
>Unfortunately, this does not accomplish what I am trying to do.

>I think this might require a call to the windows API.  If anyone is
>familiar enough with the Windows API, I would greatly appreciate any
>suggestions on code that might accomplish the disabling of window resize
>when the Excel title bar is double clicked.  Thanks in advance.

>Regards
>Hector J. Lara



Wed, 18 Jun 1902 08:00:00 GMT  
 Prevent Window Resize Or Moving Revisited
Bob

This works for the workbook window not the Excel window, which is what I am
trying to prevent from being resized by double clicking in the Excel title
bar.  I wrote the code for all of the macros in the workbook and am trying to
come up with code to disable the Excel window form being resized.  Thanks for
your thoughts.

Regards
Hector J. Lara

Quote:

> "...Clicking Tools, Protection, Protect Workbook and
> checking Structures and Windows does not do this..."

> In what way does this not work? by design, clicking the Windows checkbox in
> this protect workbook dialog does exactly this. Perhaps there's a macro
> which runs which undoes this??



Wed, 18 Jun 1902 08:00:00 GMT  
 Prevent Window Resize Or Moving Revisited
Nick

Thanks for the tip.  I'll check out the KB and see if it helps.

Regards
Hector J. Lara

Quote:

> Hi Hector,

> It's not quite what you're looking for, but there's a KB article describing
> how to create application level event handlers.

> XL97: How to Create Application Level Event Handlers
> Article ID: Q158244

> The given example is the WindowResize event, which is on the same lines as
> your problem.

> HTH,

>     Nick

> --
> Nick Manton
> Chemistry & Chemical Engineering Labs.
> SRI International, Menlo Park, CA


> >Let me restate what I am trying to accomplish.  I need to prevent the
> >Excel window from being resized when the Excel title bar is
> >double clicked.  Clicking Tools, Protection, Protect Workbook and
> >checking Structures and Windows does not do this.

> >One suggestion that looked like it might work was the following code:
> >    ActiveWindow.EnableResize = False
> >Unfortunately, this does not accomplish what I am trying to do.

> >I think this might require a call to the windows API.  If anyone is
> >familiar enough with the Windows API, I would greatly appreciate any
> >suggestions on code that might accomplish the disabling of window resize
> >when the Excel title bar is double clicked.  Thanks in advance.

> >Regards
> >Hector J. Lara



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Prevent Window Resize Or Moving

2. Resizing windows - unable to resize the text window

3. Prevent Resizing Excel Window

4. Moving and Resizing Access Window

5. Move and Resize Form WIndows from Code

6. Resizing and moving the application window

7. Dynamically move/resize controls on resized form

8. moving windows - how to prevent?

9. Preventing a function call - revisited

10. moving frames - revisited


 
Powered by phpBB® Forum Software © phpBB Group