P
PPL
Hi,
I'm no VBA expert but I'm trying to write a VBA script that selects drawing
objects by layer and cycles through the selected drawing objects and
deletes User-defined Cells i.e. Row: User.CPMSetList.
I'm getting error "argument not optional" @ the line:
Application.ActiveWindow.Shape.DeleteRow UserCPMSetList
This is the code I'm using. Can anyone please tell me where I'm going wrong?
Sub Remove()
Dim myShape As Shape
Dim index As Integer
'I'm not sure how to Dimension the next line - but it does seem to pass
Set vsoSelection1 =
Application.ActiveWindow.Page.CreateSelection(visSelTypeByLayer,visSelModeSkipSuper,
"Off-Page Reference;Process;Flowchart")
Application.ActiveWindow.Selection = vsoSelection1
For index = 1 To ActiveWindow.Selection.Count
Set myShape = ActiveWindow.Selection.Item(index)
Application.ActiveWindow.Shape.DeleteRow UserCPMSetList ' This line errors
"argument not optional"
Next index
End Sub
Any suggestions would be much appreciated
TIA
Philip
PS:
I'm sorry if I've not follwed NG etiquette. I posted & deleted this message
earlier to the visio.developer.vba group. Not sure if Outlook Express really
does delete it. though?
I'm no VBA expert but I'm trying to write a VBA script that selects drawing
objects by layer and cycles through the selected drawing objects and
deletes User-defined Cells i.e. Row: User.CPMSetList.
I'm getting error "argument not optional" @ the line:
Application.ActiveWindow.Shape.DeleteRow UserCPMSetList
This is the code I'm using. Can anyone please tell me where I'm going wrong?
Sub Remove()
Dim myShape As Shape
Dim index As Integer
'I'm not sure how to Dimension the next line - but it does seem to pass
Set vsoSelection1 =
Application.ActiveWindow.Page.CreateSelection(visSelTypeByLayer,visSelModeSkipSuper,
"Off-Page Reference;Process;Flowchart")
Application.ActiveWindow.Selection = vsoSelection1
For index = 1 To ActiveWindow.Selection.Count
Set myShape = ActiveWindow.Selection.Item(index)
Application.ActiveWindow.Shape.DeleteRow UserCPMSetList ' This line errors
"argument not optional"
Next index
End Sub
Any suggestions would be much appreciated
TIA
Philip
PS:
I'm sorry if I've not follwed NG etiquette. I posted & deleted this message
earlier to the visio.developer.vba group. Not sure if Outlook Express really
does delete it. though?