View Single Post
 
Old 03-22-2021, 06:02 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default

Eurrrrrrrrrrrrrrrreka
I found it
Not certain what I'm doing, but I've played with it so much, it was Trial and Error.

Code:
  Dim i As Integer, x As Integer, iTbl As Integer, sOthers As String
  For i = 1 To ActiveDocument.Tables.Count
    If ActiveDocument.Tables(i).Columns.Count > x Then
      x = ActiveDocument.Tables(i).Columns.Count
      iTbl = i
      sOthers = ""
    ElseIf ActiveDocument.Tables(i).Columns.Count = x Then
      sOthers = sOthers & ""
    End If
  Next i

  MsgBox "The table with the most columns is " & x & " Columns."
    
    On Error GoTo 0
I didn't really need to know about the others, so I've played with it, until I didn't see Red, or an Error message.

OMG Thank you so much.

Million appreciations for your guidance and help.

What I've put, does it makes sense to you both?

Cendrinne
Reply With Quote