There should be a shortcut icon for "wrap text"

G

Guest

There is an icon for almost every other formatting function, and wrap text is
one I use continually, but there's no shortcut and it takes several steps
each time.
 
N

Nick Hodge

Terri

You could put this code into your personal.xls and assign a shortcut key or
custom toolbar button to it, trhis will make it one-press

Sub WrapText()
Dim myCell As Range
For Each myCell In Selection
myCell.WrapText = True
Next myCell
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
G

Gord Dibben

I use this macro assigned to a button as Nick suggests.

Sub Wrap_Text()
With Selection
.WrapText = Not .WrapText
End With
End Sub

Toggles wrap text on/off as you require.


Gord Dibben Excel MVP
 
N

Nick Hodge

Gord

Probably preferable to toggle...

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
D

Dave Peterson

And one more option:

Sub Wrap_Text2()
Selection.WrapText = not activecell.wraptext
End Sub
 
N

Nick Hodge

Dave

That's just lazy ;-)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
D

Dave Peterson

Sometimes I have to run it twice to get a larger range of cells set the way I
want--but it is easier than doing it cell by cell. (lazy = a good thing!)
<vbg>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top