view里文书删除时报错的解决案

 

加一个中间文书存储doc:

    If Not udoc Is Nothing Then
    Dim askme As Integer
    askme = ws.Prompt (PROMPT_YESNO, _
    "クリアの確認", "既にデータがあります、先月のデータを直接削除しますか?手操作で削除しますか?")
        If askme = 1 Then
            Do While Not udoc Is Nothing
                Set tempdoc = udoc
            Set udoc = view.GetNextDocument( udoc )    
        Call tempdoc.RemovePermanently(True)
        Print "文書削除中...."    
        Loop
            Call ws.ViewRefresh
            MsgBox "データが全部削除しました!",,"削除済みの確認"
        Else
            Exit Sub
        End If
    End If

posted @ 2014-06-27 14:23  塔斯曼  阅读(169)  评论(0编辑  收藏  举报