Link to home
Start Free TrialLog in
Avatar of borgtamer
borgtamerFlag for United States of America

asked on

Make Cells in a Spreadsheet Control in a Userform word wrap

I have a spreadsheet control in a userform for a vba program with excel. I need to make the cells in the spreadsheet control word wrap. However, I cannot see anything on the properties page to do this and there is no way to do it in any of the tabs in the custom properties dialog box. In addition, I tried the following but got a compiler message 'Object does not support this property'
userform1.spreadsheet1.sheets("Sheet1").Range("A1:H12").WordWrap = True
userform1.spreadsheet1.sheets("Sheet1").Range("A1:H12").MultiLine = True

Open in new window


Any ideas? Thanks in advance.

Joe
Avatar of dlmille
dlmille
Flag of United States of America image

Try this:
userform1.spreadsheet1.sheets("Sheet1").Range("A1:H12").WrapText= True

Open in new window

Dave
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial