Hi all
I am new to this forum and have only limited experience of excel.
I have a worksheet where i need three columns at fixed widths and in one of these columns i need the text to wrap. I have a macro and have included a wrap text function in it but it doesn't seem to wrap text!! No cells are merged and the row height has not been altered from the default height. I would very much appreciate if one of you could look at the macro(pasted below) and tell me why the text won't wrap. I have looked through forums and found answers to this question, but none of the solutions I have come across seem to work
Many thanks.
Northbank
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="123"
Range("A4:T1300").Select
Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A3:T3").Select
If ActiveSheet.AutoFilterMode = False Then Selection.AutoFilter
Range("A4").Select
Selection.ColumnWidth = 48
Range("B4").Select
Selection.ColumnWidth = 32
Range("C4").Select
Selection.ColumnWidth = 19
Range("A4:A1300").Select
With Selection
.WrapText = True
End With
Range("A4:D1300").Select
Selection.Locked = False
Range("F4:T1300").Select
Selection.Locked = False
Range("B4:T1300").Select
With Selection.Font
.Name = "Calibri"
.FontStyle = "Regular"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("A4:A1300").Select
With Selection.Font
.Name = "Calibri"
.FontStyle = "Bold"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
ActiveSheet.Protect Password:="123", _
DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True, AllowInsertingHyperlinks:=True
Rows("4:4").Select
ActiveWindow.FreezePanes = True
ActiveWindow.Zoom = 80
Range("C2").Select
ActiveWindow.ScrollRow = 1
ActiveWorkbook.Save
Application.ScreenUpdating = True
End Sub
Bookmarks