以前答过的http://topic.csdn.net/t/20060304/13/4592398.html Sub Macro1() Dim i As Integer For i = 1 To ActiveDocument.Tables.Count If Selection.InRange(ActiveDocument.Tables(i).Range) Then Exit For Next MsgBox IIf(i > ActiveDocument.Tables.Count, "No tables are selected!", "tables(" & i & ") is selected!") End Sub
以前答过的http://topic.csdn.net/t/20060304/13/4592398.html Sub Macro1() Dim i As Integer For i = 1 To ActiveDocument.Tables.Count If Selection.InRange(ActiveDocument.Tables(i).Range) Then Exit For Next MsgBox IIf(i > ActiveDocument.Tables.Count, "No tables are selected!", "tables(" & i & ") is selected!") End Sub
Dim i As Integer For i = 1 To ActiveDocument.Tables.Count If Selection.InRange(ActiveDocument.Tables(i).Range) Then Exit For Next MsgBox IIf(i > ActiveDocument.Tables.Count, "No tables are selected!", "tables(" & i & ") is selected!") End Sub
Sub Macro1()
Dim i As Integer
For i = 1 To ActiveDocument.Tables.Count
If Selection.InRange(ActiveDocument.Tables(i).Range) Then Exit For
Next
MsgBox IIf(i > ActiveDocument.Tables.Count, "No tables are selected!", "tables(" & i & ") is selected!")
End Sub
Sub Macro1()
Dim i As Integer
For i = 1 To ActiveDocument.Tables.Count
If Selection.InRange(ActiveDocument.Tables(i).Range) Then Exit For
Next
MsgBox IIf(i > ActiveDocument.Tables.Count, "No tables are selected!", "tables(" & i & ") is selected!")
End Sub
For i = 1 To ActiveDocument.Tables.Count
If Selection.InRange(ActiveDocument.Tables(i).Range) Then Exit For
Next
MsgBox IIf(i > ActiveDocument.Tables.Count, "No tables are selected!", "tables(" & i & ") is selected!")
End Sub