You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI~ , i hava one question that's , when i use code by:
Sub removeall()
Dim i, A As Integer
For Each i In ActiveDocument.VBProject.VBComponents
If i.Type = 1 Then
MsgBox i.Type
With Application.VBE.ActiveVBProject.VBComponents
On Error GoTo ErrorHandler
MsgBox i.Name
.Remove .Item(i.Name)
End With
End If
Next
ErrorHandler:
MsgBox "err!"
End Sub
Sub AutoOpen()
Call removeall
If ActiveDocument.ReadOnly = False Then
ActiveDocument.Save
End If
End Sub
Sub Auto_Open()
AutoOpen
End Sub
What I expected was the vba code removed and .doc saved,but contrary.when i use F5 do it the vab removed .......
Can you do me a favor? Thank!
The text was updated successfully, but these errors were encountered:
HI~ , i hava one question that's , when i use code by:
What I expected was the vba code removed and .doc saved,but contrary.when i use F5 do it the vab removed .......
Can you do me a favor? Thank!
The text was updated successfully, but these errors were encountered: