Results 1 to 12 of 12

Text Won't Wrap!!

Threaded View

  1. #1
    Registered User
    Join Date
    09-07-2009
    Location
    Galway, Ireland
    MS-Off Ver
    Excel 2007
    Posts
    15

    Text Won't Wrap!!

    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
    Last edited by northbank; 09-07-2009 at 05:49 AM. Reason: Add code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1