View Single Post
 
Old 09-27-2015, 12:01 PM
CodingGuruInTraining CodingGuruInTraining is offline Windows Vista Office 2010 32bit
Novice
 
Join Date: Sep 2015
Posts: 13
CodingGuruInTraining is on a distinguished road
Default

Today the same section is giving me a different error, this time regarding the Selection part:
Code:
          If ((i Mod 5) + 1) = 1 Then
            If .Cells(i + 4).ColumnIndex = 1 Then
              Set Rng = .Cells(i).Range
              Rng.End = .Cells(i + 4).Range.End
              Rng.Select: Selection.Cells.Merge
            End If
I'm using the same document I provided, see attached image. The unmerged sample is at the bottom in the last table.

I got rid of text wrapping by adding the following code near the end, but that seemed to make the columns slightly offset from the first row. I tried fixing this by adjusting the Array widths slightly, some to 1000s of an inch, but that only fixed some. Any idea why this would be?
Code:
      End With
      Tbl.Rows.WrapAroundText = False    
      Tbl.Rows.Alignment = wdAlignRowCenter  
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
Attached Images
File Type: jpg Table Template Error.jpg (27.2 KB, 13 views)

Last edited by CodingGuruInTraining; 09-27-2015 at 12:10 PM. Reason: now with image attached
Reply With Quote