Is it possible to catch ColumnResize (or RowResize) Event in

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi pmdown,

Excel does not have rows/columns resize event.
So, to catch event, you need to make an original event...(I think :biggrin:)

Please look into SetWindowLong, CallWindowProc and how to subclass.

Subclass is
One of the techniques for acquiring the message from Windows which cannot be
acquired usually.

Sorry I cannot explain it in detail in English.... Maybe Juan or Ivan knows... :biggrin:

And, here is the url of sample code for std module(Japanese page, but you can see code)
http://www.remus.dti.ne.jp/~shenron/access/knowhow/samples/stdSubClass.txt
 
Upvote 0
Hi Colo.

I suppose, that using API, will be only way to do this, but it's for me too difficult...

Thanx
 
Upvote 0
Tell us the context; why you need to know when a resize event is occurring.

Tell us the chain of events that you expect the user to perform, at what point you want the resize event to trigger, and what you plan to do afterwards.

If you can share your plan, we can share our expertise.
 
Upvote 0
Hi Steve.
Thank's for interest in my Question.

I create in Excel a Form for entering data. Because of Printing and next processing, the Form can be only one page high and one page width.

But users stil can entering, deleting or resizing columns (rows). For this reason i need, by each this event check if isn't exceed the page width ( page length ).

Entering columns can I catch with "WorksheetChange Event", but column resizing - i don't now...

Best regards
pmdown
 
Upvote 0
...I forget: I don't wont and I can't use the "Adjust to 1 page horizontaly and 1 page verticaly" function in page setup...
 
Upvote 0
Well,you could tally up the .columnwidths, and compare against an acceptable value. You could do that in BeforePrint. If there is a problem, set cancel to true, msgbox user, tell them to adjust columns and try again.

You could protect the sheet against column adjustments. Perhaps you WANT the users to have that freedom, I think that's wonderful on your part, going out of your way to allow it. I understand (from other threads) that locking/protecting a worksheet is confusing to some. So I won't say any more about the topic.

Or, if the issue is really because the protection options of Excel 97 are getting in your way, you could leave the protection as it is, and just explicitly assign the .columnwidths in the Workbook_BeforePrint routine.

Let them play all they want, just assign columnwidths to the correct values immediately before printing.
This message was edited by stevebausch on 2002-10-14 09:46
 
Upvote 0

Forum statistics

Threads
1,213,517
Messages
6,114,085
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top