Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wanted to have my cell to wrap text in merge cells.
I tried to select wrap text without merge cells then it works. It does not warp text when cells are merged. Any way, to wrap text in merge cells? Your information is great appreciated, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
inungh used his keyboard to write :
I wanted to have my cell to wrap text in merge cells. I tried to select wrap text without merge cells then it works. It does not warp text when cells are merged. Any way, to wrap text in merge cells? Your information is great appreciated, Try... Merge first, then wrap all merged cells. Alternatively, wrap all cells to be merged, then merge wrapped cells. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Merged cells DO allow wrap text.
What doesn't work with merged cells is row autofit. You need event code to autofit the wrapped text in merged cells. See google search thread for code by Greg Wilson. http://tinyurl.com/27qe7ql Gord Dibben MS Excel MVP On Wed, 05 Jan 2011 12:14:16 -0500, GS wrote: inungh used his keyboard to write : I wanted to have my cell to wrap text in merge cells. I tried to select wrap text without merge cells then it works. It does not warp text when cells are merged. Any way, to wrap text in merge cells? Your information is great appreciated, Try... Merge first, then wrap all merged cells. Alternatively, wrap all cells to be merged, then merge wrapped cells. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gord Dibben laid this down on his screen :
Merged cells DO allow wrap text. What doesn't work with merged cells is row autofit. You need event code to autofit the wrapped text in merged cells. See google search thread for code by Greg Wilson. http://tinyurl.com/27qe7ql Gord Dibben MS Excel MVP On Wed, 05 Jan 2011 12:14:16 -0500, GS wrote: inungh used his keyboard to write : I wanted to have my cell to wrap text in merge cells. I tried to select wrap text without merge cells then it works. It does not warp text when cells are merged. Any way, to wrap text in merge cells? Your information is great appreciated, Try... Merge first, then wrap all merged cells. Alternatively, wrap all cells to be merged, then merge wrapped cells. Also true! Perhaps the OP should have been more clear about whether it was an autofit issue or a wrap text issue. What I'd like to know is if there's any way to programmatically determine the number of lines of text in a wrapped cell. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My experience has been that most who ask this question believe wrap text is not
enabled because the row won't autofit to show all text due to the cell merging. Number of lines in a wrap text cell? See discussion and code from Rick Rothstein. http://tinyurl.com/273ydra Gord On Wed, 05 Jan 2011 12:50:38 -0500, GS wrote: Also true! Perhaps the OP should have been more clear about whether it was an autofit issue or a wrap text issue. What I'd like to know is if there's any way to programmatically determine the number of lines of text in a wrapped cell. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gord Dibben submitted this idea :
My experience has been that most who ask this question believe wrap text is not enabled because the row won't autofit to show all text due to the cell merging. Number of lines in a wrap text cell? See discussion and code from Rick Rothstein. http://tinyurl.com/273ydra Gord Thanks, Gord! That's a really good solution... -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gord
I have implemented this code in the Worksheet_Change Event and it works well. I have added an initial unprotect command and a terminating protect command: ActiveSheet.Protect UserInterfaceOnly:=True, DrawingObjects:=False, Contents:=True, Scenarios:=True _ , AllowFormattingCells:=True, AllowFormattingColumns:=True, AllowFormattingRows:=True, AllowFiltering _ :=True However, upon hitting the 'Delete' key, I get the message "The cell or chart you are trying to change is protected and therefore read-only. To modify a protected cell or chart, first remove protection........" Essentially, after text is entered into any cell, it sets the locked check box to half-greyed somehow. This means that users can no longer select multiple cells and hit delete in order to clear contents. Can you see a way round this? Many thanks! Submitted via EggHeadCafe Entity Framework Code-First Library CTP 5 Quick Facts http://www.eggheadcafe.com/tutorials...ick-facts.aspx |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can I see a way around this?
Yes. Don't protect the sheet. The posted line you added to Greg's code does nothing but unprotect the sheet when you enter something in any unlocked merged cell. After entry, the code runs to autofit that row then re-protects the sheet which locks all cells that you have chosen to be locked. Don't know where you inserted the line or why you think you can select multiple locked cells and clear contents on a protected sheet. If you want to email me the workbook with a description of what you need, I'll have a look at it. change phnorton to gorddibb Gord On Tue, 11 Jan 2011 11:02:34 GMT, Mark Winspear wrote: Hi Gord I have implemented this code in the Worksheet_Change Event and it works well. I have added an initial unprotect command and a terminating protect command: ActiveSheet.Protect UserInterfaceOnly:=True, DrawingObjects:=False, Contents:=True, Scenarios:=True _ , AllowFormattingCells:=True, AllowFormattingColumns:=True, AllowFormattingRows:=True, AllowFiltering _ :=True However, upon hitting the 'Delete' key, I get the message "The cell or chart you are trying to change is protected and therefore read-only. To modify a protected cell or chart, first remove protection........" Essentially, after text is entered into any cell, it sets the locked check box to half-greyed somehow. This means that users can no longer select multiple cells and hit delete in order to clear contents. Can you see a way round this? Many thanks! Submitted via EggHeadCafe Entity Framework Code-First Library CTP 5 Quick Facts http://www.eggheadcafe.com/tutorials...ick-facts.aspx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Wrap Text code with merge cells | Excel Programming | |||
Wrap Text with merge cells code | Excel Discussion (Misc queries) | |||
text outside merge cells despite clicking wrap text | Excel Worksheet Functions | |||
Can't Wrap text in the Merge Cells | Excel Discussion (Misc queries) | |||
Wrap text, Merge cells | Excel Discussion (Misc queries) |