Make Cells in a Spreadsheet Control in a Userform word wrap

Posted on 2011-05-09
Medium Priority
Last Modified: 2012-05-11
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.

Question by:borgtamer
LVL 42

Expert Comment

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

Open in new window

LVL 85

Accepted Solution

Rory Archibald earned 2000 total points
ID: 35723581
You can't wrap text in a spreadsheet control, I'm afraid.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question