Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
XL2002 - trigger sheet event BEFORE deactivating | Excel Programming | |||
unable to get the excel app event trigger for for window resize | Excel Programming | |||
Columns resize event | Excel Programming | |||
Column resize event | Excel Programming | |||
Format Event Trigger (XL2002) | Excel Programming |