NOTE TO MANAGER: If this question gets resolved, then my previous question
"How do I determine Table Column Index Number?" should be deleted!!!
If I select the LAST ROW of a table, how can I determine if it contains MERGED CELLS?
Thanks for your help!
Last edited by sauerj; 09-17-2010 at 09:23 AM.
You may want to use a different way of defining your range for the last row, but once you have it selected, you could use something along these lines:
Sub test() Dim cel As Range Range("14:14").Select For Each cel In Selection Set ma = cel.MergeArea If ma.Address <> cel.Address Then HasMergedCells = True Exit For End If Next End Sub
Scratch that. I just realised you asked in the Word forum, not Excel.
Thanks for trying. Not a lot of help out there for Word when you get a little deeper than the beginner level (ugh!).
I only have Word 2007 but this seems to work.
Dim tblTemp As Table Set tblTemp = ActiveDocument.Tables(1) If tblTemp.Columns.Count <> tblTemp.Rows(tblTemp.Rows.Count).Cells.Count Then MsgBox "Row has merged cells in last row", vbInformation End If
Wow! Your good! I love it when the answer is simple & clean! ... SOLVED and merit given!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks