Make Cells in a Spreadsheet Control in a Userform word wrap

Posted on 2011-05-09
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 41

    Expert Comment

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

    Open in new window

    LVL 85

    Accepted Solution

    You can't wrap text in a spreadsheet control, I'm afraid.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
    Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  ( Here (http…
    This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now