Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
ajm
 
Posts: n/a
Default how to change linespace in excel ?

how to change linespace in excel ?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default 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.com


"ajm" wrote in message
...
how to change linespace in excel ?



  #3   Report Post  
Member
 
Location: London
Posts: 78
Default

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 "Range" Then
Beep
Exit Sub
End If
Set oSelection = Selection

If IsMissing(tSheetname) And IsMissing(tCell) And IsMissing(tText) Then
If MsgBox("Turn this cell into a long-text edit box?", vbQuestion + vbYesNo) = vbNo Then
Exit 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) Then
NewBox.Characters.Text = .Text
Else
NewBox.Characters.Text = ""
nStart = 1
While nStart LT= Len(tText)
NewBox.Characters(NewBox.Characters.Count).Insert String:=Mid(tText, nStart, 254)
nStart = nStart + 253
Wend
While nStart GT= 1
'NewBox.Characters(NewBox.Characters.Count).Insert String:=Mid(tText, nStart, 253)
nStart = nStart - 253
Wend
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 - 1
nTop = nTop + Worksheets(tWorksheet).Cells(zRow, 1).Height
Next zRow
End If
RowTop = nTop
End Function

Quote:
Originally 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.com


"ajm" wrote in message
...
how to change linespace in excel ?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the color of all series in an excel chart in one go. Marielle Charts and Charting in Excel 2 May 3rd 23 07:45 PM
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
Excel should let me change case as word does. Thanks! Donna Excel Discussion (Misc queries) 1 January 17th 06 11:32 PM
Excel should have a quick and simple "change case" function like . NinaSvendsen Excel Worksheet Functions 1 January 28th 05 03:15 PM
How to change the color of all series in an excel chart in one go. Mz2 Charts and Charting in Excel 1 January 20th 05 01:07 AM


All times are GMT +1. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"