close

how to change linespace in excel ?

'Linespace' is not a given name for anything in Excel. What
exactly do you mean by 'linespace'?--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.comquot;ajmquot; gt; wrote in message
...
gt; how to change linespace in excel ?
The answer is, Excel doesn't have selectable line spacing. Sorry. Wish it did.

Below is an alternative - overlay a text box over a cell to make it into a 'comment/memo' area.

MB

Public Sub AddTextBox(Optional tSheetname, Optional tCell, Optional tText) 'Add a box for long text into the current cell. If Not IsMissing(tSheetname) And Not IsMissing(tCell) Then Worksheets(tSheetname).Activate Range(tCell).Select End If If TypeName(Selection) LT GT quot;Rangequot; Then Beep Exit Sub End If Set oSelection = Selection If IsMissing(tSheetname) And IsMissing(tCell) And IsMissing(tText) Then If MsgBox(quot;Turn this cell into a long-text edit box?quot;, vbQuestion vbYesNo) = vbNo ThenExit Sub End If End If 'Set to 100% zoom first, otherwise position co-ordinates get screwed due to rounding errors oZoom = Application.ActiveWindow.Zoom 'record active zoom so that it can be set back at end Application.ScreenUpdating = False Application.ActiveWindow.Zoom = 100 BoxTop = RowTop(oSelection.Worksheet.Name, oSelection.Address) With oSelection Set NewBox = ActiveSheet.TextBoxes.Add(.Left, BoxTop, .Width, .Height) NewBox.Interior.ColorIndex = .Interior.ColorIndex If IsMissing(tText) ThenNewBox.Characters.Text = .Text ElseNewBox.Characters.Text = quot;quot;nStart = 1While nStart LT= Len(tText) NewBox.Characters(NewBox.Characters.Count).Insert String:=Mid(tText, nStart, 254) nStart = nStart 253WendWhile nStart GT= 1 'NewBox.Characters(NewBox.Characters.Count).Insert String:=Mid(tText, nStart, 253) nStart = nStart - 253Wend End If NewBox.Border.LineStyle = xlNone NewBox.Interior.Pattern = xlSolid NewBox.Placement = xlMoveAndSize NewBox.PrintObject = True NewBox.Border.Color = oSelection.Borders(xlTop).Color NewBox.Border.Weight = oSelection.Borders(xlTop).Weight NewBox.Characters.Font.Name = oSelection.Font.Name NewBox.Characters.Font.Size = oSelection.Font.Size NewBox.Characters.Font.FontStyle = oSelection.Font.FontStyle End With Application.ActiveWindow.Zoom = oZoom
End Sub

Public Function RowTop(tWorksheet, tCell) nRow = Range(tCell).Row nTop = 0 If nRow GT 1 Then For zRow = 1 To nRow - 1nTop = nTop Worksheets(tWorksheet).Cells(zRow, 1).Height Next zRow End If RowTop = nTop
End FunctionOriginally Posted by Chip Pearson'Linespace' is not a given name for anything in Excel. What
exactly do you mean by 'linespace'?--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.comquot;ajmquot; wrote in message
...how to change linespace in excel ?

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()