Forum Discussion
VBA to Autosize an Excel note is not working for me on MAC/365 works on Windows/Excel v10
- Jan 21, 2021
Mark,
Spent a long time looking at this, gave up a couple of times as being undoable. It appears that on a Mac autosize does not work. I looked at various macros other people had done and ended up butchering one to work with comments. Even then there is still some guess work involved. In a nut shell the Mac copies the comments text, places it into a cell on a temporary sheet, sizes the cell with to the same width as the comment, the calculates how many lines of text there are then multiplies that by the text size in pixels to get the height of the comment.
Not 100% accurate but nearly gets it right.
Rich
Mark,
Spent a long time looking at this, gave up a couple of times as being undoable. It appears that on a Mac autosize does not work. I looked at various macros other people had done and ended up butchering one to work with comments. Even then there is still some guess work involved. In a nut shell the Mac copies the comments text, places it into a cell on a temporary sheet, sizes the cell with to the same width as the comment, the calculates how many lines of text there are then multiplies that by the text size in pixels to get the height of the comment.
Not 100% accurate but nearly gets it right.
Rich
- Timothy_KingMar 02, 2024Copper ContributorThank you Rich for posting this macro. This helped resize comments in an excel file on a mac. Worked wonderfully! Appreciate your effort!
Timothy - Mark_Smith_007Jan 21, 2021Copper Contributor
Rich99Hi Rich, thanks for this you have got me out of a hole. I needed to resolve this one way or another for next Monday so I am very happy. I will experiment with a bigger data set and see how I get on. Thanks again, Mark