ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   autosize (https://www.excelbanter.com/excel-programming/362408-autosize.html)

Learning the hard way

autosize
 
I have a code that autosizes all my columns only when you, but it only works
when you click another sheet in the work book and then click back to the
sheet with the code. How do i get it to autosize when you move to the any
other cell instead of having to go to another sheet and then back again?

Your help is always appreciated people so I thank you in advance.

ADG

autosize
 
Try puting your code in the below for the sheet

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Check to see if you are in the right column before executing.
--
Tony Green


"Learning the hard way" wrote:

I have a code that autosizes all my columns only when you, but it only works
when you click another sheet in the work book and then click back to the
sheet with the code. How do i get it to autosize when you move to the any
other cell instead of having to go to another sheet and then back again?

Your help is always appreciated people so I thank you in advance.


Learning the hard way

autosize
 
Worked perfectly.
Thanks ADG, dont know why I didnt think of that! Must be getting tired.

"ADG" wrote:

Try puting your code in the below for the sheet

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Check to see if you are in the right column before executing.
--
Tony Green


"Learning the hard way" wrote:

I have a code that autosizes all my columns only when you, but it only works
when you click another sheet in the work book and then click back to the
sheet with the code. How do i get it to autosize when you move to the any
other cell instead of having to go to another sheet and then back again?

Your help is always appreciated people so I thank you in advance.



All times are GMT +1. The time now is 04:12 AM.

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