PDA

View Full Version : How to apply VBA formula to stop row height from readjusting ? (Excel File)



JULIANI
05-13-2021, 07:24 PM
Hi all,

I am a beginner in VBA.

I am currently working on a excel file where it is created like a form (but I am not using the Form Creation function).

However, as I extend the excel file to another user, the forms appearance will be truncated as the row height will be readjusted, if the file is opened from other Devices (other Laptop/Desktop).

I have locked the workbook, but the other recipient who opened the excel file will noticed the difference between the original excel file and the excel file that they received.

Anyone have encountered this issue before? Not sure whether applying VBA formula in the excel will help to lock the row height from readjusting. However, I am not sure how can it be done, Hope to get some enlightenment from the community. Thanks :)

anish.ms
05-21-2021, 12:11 PM
You can set back your desired row height in the worksheet change event

For example



Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.RowHeight = 15
End Sub


OR



Range("A1:A10").RowHeight = 15