Auto Fit on Row Height
I have 2 worksheets in a workbook which are filled in by other users using a
selection of drop down lists and vlookups etc. and I want to be able to automatically have the row height selected by the data entered. I have been looking through previous discussions and found the following entry which works a treat for what I am doing, however if I protect the worksheets then this no longer works any suggestions. There are no meged cells in these worksheets Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False Cells.EntireRow.AutoFit Application.EnableEvents = True Thanks -- Dragonette |
Auto Fit on Row Height
are you getting run-time error '1004' on your macro?
did you tick to enable Format row in protect sheet options? "dragons_lair" wrote: I have 2 worksheets in a workbook which are filled in by other users using a selection of drop down lists and vlookups etc. and I want to be able to automatically have the row height selected by the data entered. I have been looking through previous discussions and found the following entry which works a treat for what I am doing, however if I protect the worksheets then this no longer works any suggestions. There are no meged cells in these worksheets Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False Cells.EntireRow.AutoFit Application.EnableEvents = True Thanks -- Dragonette |
Auto Fit on Row Height
No I am not getting a runtime error I left an "end Sub" off in my query.
And no I hadn't enabled the "format row" in the protection sheet, but I have now and it is working perfectly thank you very much -- Dragonette "eksh" wrote: are you getting run-time error '1004' on your macro? did you tick to enable Format row in protect sheet options? "dragons_lair" wrote: I have 2 worksheets in a workbook which are filled in by other users using a selection of drop down lists and vlookups etc. and I want to be able to automatically have the row height selected by the data entered. I have been looking through previous discussions and found the following entry which works a treat for what I am doing, however if I protect the worksheets then this no longer works any suggestions. There are no meged cells in these worksheets Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False Cells.EntireRow.AutoFit Application.EnableEvents = True Thanks -- Dragonette |
All times are GMT +1. The time now is 06:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com