View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
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