也可以这样:
保存按钮:
Tables("表A").Filter = ""Tables("表A").Sort = "工序名称"For Each r As Row In Tables("表A").Rows r("工序编号") = r.Index + 1NextDataTables("表A").Save()