Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default XL2002 - Application Resize Event...

Hi All

Is there an event that triggers when the application is resized? (not the
window).
If so, what is it?

Thanks

Trevor Williams
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default XL2002 - Application Resize Event...

Hi Trevor,

Unfortunately resizing Excel's main window does not trigger an Excel/vba
type event (though of course resizing a workbook window within the
application does).

In theory it might be possible to trap Windows (ie OS) events but it would
imply terms such as "subclass" and "callback" functions to trap WM_SIZE of
the Excel's main window (application.hwnd in xl2002+ or requires FindWindow
API in earlier versions). Tricky stuff, in particular to ensure no
possibility of GPF.

Also not sure, but it I suspect it would also require running a continuous
loop (perhaps with DoEvents to allow for other activities) to catch the
event.

Regards,
Peter T

"Trevor Williams" wrote in
message ...
Hi All

Is there an event that triggers when the application is resized? (not the
window).
If so, what is it?

Thanks

Trevor Williams



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default XL2002 - Application Resize Event...

Hi Peter.

It's a shame there's nothing built in. I don't think my skills levels go as
deep as dabbling with Windows events etc.

Thanks for the reply.

Trevor


"Peter T" wrote:

Hi Trevor,

Unfortunately resizing Excel's main window does not trigger an Excel/vba
type event (though of course resizing a workbook window within the
application does).

In theory it might be possible to trap Windows (ie OS) events but it would
imply terms such as "subclass" and "callback" functions to trap WM_SIZE of
the Excel's main window (application.hwnd in xl2002+ or requires FindWindow
API in earlier versions). Tricky stuff, in particular to ensure no
possibility of GPF.

Also not sure, but it I suspect it would also require running a continuous
loop (perhaps with DoEvents to allow for other activities) to catch the
event.

Regards,
Peter T

"Trevor Williams" wrote in
message ...
Hi All

Is there an event that triggers when the application is resized? (not the
window).
If so, what is it?

Thanks

Trevor Williams




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default XL2002 - Application Resize Event...

Hi again. I agree, not unreasonable at all to want something built in.

I had a further attempt to get something working but failed, so I asked in
the main vb group. Karl Peterson responded saying in effect forget about
trying to do it in VBA. That's good enough for me.

http://groups.google.co.uk/group/mic...ba7392312b9483

If really really interested to take it further, which I assume is not the
case, I found a C dll that does appear to work albeit with the restriction
of requiring a continual loop in VBA. See my followup in the same thread for
details.

Regards,
Peter T

"Trevor Williams" wrote in
message ...
Hi Peter.

It's a shame there's nothing built in. I don't think my skills levels go

as
deep as dabbling with Windows events etc.

Thanks for the reply.

Trevor


"Peter T" wrote:

Hi Trevor,

Unfortunately resizing Excel's main window does not trigger an Excel/vba
type event (though of course resizing a workbook window within the
application does).

In theory it might be possible to trap Windows (ie OS) events but it

would
imply terms such as "subclass" and "callback" functions to trap WM_SIZE

of
the Excel's main window (application.hwnd in xl2002+ or requires

FindWindow
API in earlier versions). Tricky stuff, in particular to ensure no
possibility of GPF.

Also not sure, but it I suspect it would also require running a

continuous
loop (perhaps with DoEvents to allow for other activities) to catch the
event.

Regards,
Peter T

"Trevor Williams" wrote in
message ...
Hi All

Is there an event that triggers when the application is resized? (not

the
window).
If so, what is it?

Thanks

Trevor Williams






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default XL2002 - Application Resize Event...

Hi Peter

I've given it a quick read through and decided the coding outweighs the need!
It's more a 'nice to have' rather than an essential part of the workbook.

Thanks for your time and effort looking into it.

Regards

Trevor

"Peter T" wrote:

Hi again. I agree, not unreasonable at all to want something built in.

I had a further attempt to get something working but failed, so I asked in
the main vb group. Karl Peterson responded saying in effect forget about
trying to do it in VBA. That's good enough for me.

http://groups.google.co.uk/group/mic...ba7392312b9483

If really really interested to take it further, which I assume is not the
case, I found a C dll that does appear to work albeit with the restriction
of requiring a continual loop in VBA. See my followup in the same thread for
details.

Regards,
Peter T

"Trevor Williams" wrote in
message ...
Hi Peter.

It's a shame there's nothing built in. I don't think my skills levels go

as
deep as dabbling with Windows events etc.

Thanks for the reply.

Trevor


"Peter T" wrote:

Hi Trevor,

Unfortunately resizing Excel's main window does not trigger an Excel/vba
type event (though of course resizing a workbook window within the
application does).

In theory it might be possible to trap Windows (ie OS) events but it

would
imply terms such as "subclass" and "callback" functions to trap WM_SIZE

of
the Excel's main window (application.hwnd in xl2002+ or requires

FindWindow
API in earlier versions). Tricky stuff, in particular to ensure no
possibility of GPF.

Also not sure, but it I suspect it would also require running a

continuous
loop (perhaps with DoEvents to allow for other activities) to catch the
event.

Regards,
Peter T

"Trevor Williams" wrote in
message ...
Hi All

Is there an event that triggers when the application is resized? (not

the
window).
If so, what is it?

Thanks

Trevor Williams






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
XL2002 - trigger sheet event BEFORE deactivating Trevor Williams Excel Programming 5 January 25th 08 02:43 PM
unable to get the excel app event trigger for for window resize [email protected] Excel Programming 0 November 30th 05 03:03 AM
Columns resize event mihaij Excel Programming 1 October 18th 05 07:08 PM
Column resize event Tarun Gupta Excel Programming 1 May 25th 04 07:56 PM
Format Event Trigger (XL2002) Ronald Dodge Excel Programming 2 April 27th 04 09:48 PM


All times are GMT +1. The time now is 09:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"