A
andreas
Dear Experts:
I wonder whether it is possible to iterate through a collection of
objects and omit a couple of iterations by entering the iteration
numbers to be omitted into an input box and then let the macro run.
Here is an example
Sub TableMacro()
Dim i as integer
For i = 1 to 7
If (i <> 3) And (i <> 4) And (i<>12) Then
'the 3,4 and 12 should be entered in an Input Box such as "3;4;12"
Set tbl = ActiveDocument.Tables(i)
If tbl.Rows(1) etc. then
'do stuff
End If
End If
Next i
End Sub
I wonder whether this is feasible. I hope I have made myself made
clear.
Regards, Andreas
I wonder whether it is possible to iterate through a collection of
objects and omit a couple of iterations by entering the iteration
numbers to be omitted into an input box and then let the macro run.
Here is an example
Sub TableMacro()
Dim i as integer
For i = 1 to 7
If (i <> 3) And (i <> 4) And (i<>12) Then
'the 3,4 and 12 should be entered in an Input Box such as "3;4;12"
Set tbl = ActiveDocument.Tables(i)
If tbl.Rows(1) etc. then
'do stuff
End If
End If
Next i
End Sub
I wonder whether this is feasible. I hope I have made myself made
clear.
Regards, Andreas