ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Catch column width event. (https://www.excelbanter.com/excel-programming/330852-catch-column-width-event.html)

Artem Omelianchuk

Catch column width event.
 
Hello,everybody.
I try to add excel to my mfc dialog application.

I want only one - to catch event when user change width of column. How can i
do it, which event i should catch?Is it possible?

P.S. As i understand,there is two ways to add excel to my application. First
is to add ActiveX control to dialog form. Second to import type library and
run excel. But on second way i can't kill all toolbars and make Excel to be
child of my dialog (i.e repeate view like on first way),is it posible?

P.P.S Please answer with sample code or link to any article.

Thank you.

Peter T

Catch column width event.
 
Unfortunately a change of column width does not trigger an event, so there
is no direct solution. Further, format changes in general do not trigger
events.

If it's really important for you to monitor, maybe store all column widths
in a 1 to 256 array, an array of the width of the used range, or just those
columns you are interested in. In subsequent sheet or selection change
events compare differences in actual and stored widths.

Any change in width(s) would have been done prior to the event you are
trapping.

I don't follow what you are asking in your PS's. Sound like separate
questions which might be worth restating in a new thread.

Regards,
Peter T

"Artem Omelianchuk" wrote in
message ...
Hello,everybody.
I try to add excel to my mfc dialog application.

I want only one - to catch event when user change width of column. How can

i
do it, which event i should catch?Is it possible?

P.S. As i understand,there is two ways to add excel to my application.

First
is to add ActiveX control to dialog form. Second to import type library

and
run excel. But on second way i can't kill all toolbars and make Excel to

be
child of my dialog (i.e repeate view like on first way),is it posible?

P.P.S Please answer with sample code or link to any article.

Thank you.




Nick Hebb

Catch column width event.
 
If you're using MFC, I would add the ActiveX control and use an
asynchronous timer to poll the column widths and raise your own event.



All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com