Is there a Wrap Text command button?

Ã

Ãlvaro

hi I would like to know if it is there a Wrap Text command button and/or
hotkey?
thanks all!

Ãlvaro
 
Ã

Ãlvaro

Hi, but I would like to have a button on the toolbar that icouyld press once
and all the selected cells would wrap text.

dou you know how?
Thans!!
 
G

Gord Dibben

Alvaro

I keep a button on my toolbar to run this macro.

Toggles wrap text on/off.

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


Gord Dibben MS Excel MVP
 
G

Gord Dibben

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to Tool>Macro>Macros.

To create a button you can use a button from the Forms Toolbar which will place
a button on your sheet.

Right-click and "assign macro".

If you want a button on an existing Toolbar................

Tools>Customize>Commands>Macros.

Drag the Smiley Face up to an existing Toolbar and drop it there.

Right-click and "Assign macro".


Gord

Gord
This is exactly what I need.
Could you explain how to create the button and write the macro

Regards

Gord Dibben MS Excel MVP
 
Top