![]() |
#2
|
||||
|
||||
![]()
I think this works one row at a time.
Code:
Sub MoveARow() Dim aLRow As ListRow, activeListCells As Range Dim iRowSel As Integer, iRowList As Integer, iSelRow As Integer Dim aLO As ListObject, aLO2 As ListObject Set aLO = ActiveWorkbook.Sheets("ForEdit").ListObjects("tForEdit") Set aLO2 = ActiveWorkbook.Sheets("Edited").ListObjects("tEdited") iRowSel = Selection.Row iRowList = aLO.Range.Row Set activeListCells = Intersect(aLO.DataBodyRange, Selection) If activeListCells Is Nothing Then MsgBox "List row not selected" Else iSelRow = iRowSel - iRowList Set aLRow = aLO.ListRows(iSelRow) End If aLO2.ListRows.Add aLO2.ListRows(aLO2.ListRows.Count).Range.Value = aLRow.Range.Value aLRow.Delete End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Deleting Blank Space between table heading and table rows | Pete Jones | Word Tables | 5 | 01-22-2018 04:11 PM |
![]() |
kevinbradley57 | Word VBA | 10 | 08-17-2017 02:13 PM |
![]() |
donaldadams1951 | Word VBA | 4 | 02-04-2015 03:54 PM |
![]() |
Joey Cheung | Word Tables | 1 | 08-12-2014 05:15 PM |
![]() |
dennist77 | Word | 1 | 10-29-2013 11:39 PM |