ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Removal of VBA from Excel not working (https://www.excelbanter.com/excel-programming/374902-removal-vba-excel-not-working.html)

charles

Removal of VBA from Excel not working
 
After a number of macros are run in Excel I have code, as shown below, to
remove the VBA.

The problem I am having is that when the .xls is emailed, the emails is
being bounced from anti-virus systems saying that "vb script is detected".

When I go into the VB Script I see the "VBProject(Filename.xls)". Although
there is nothing in it, I am wondering if this is causing the problems.

When I try to remove the VBProject by right clicking, the "Remove" is not
highlighted. I have checked off "trust vb script" as a preference in excel.

The code is

Dim VBComp As VBComponent
Set VBComp = ThisWorkbook.VBProject.VBComponents("Module2")
ThisWorkbook.VBProject.VBComponents.Remove VBComp
End Sub

Note that the actual Module is removed, however, something in the anti-virus
firewalls are picking up script.

Please advise of how to permanentlly remove.



Don Guillett

Removal of VBA from Excel not working
 
How about code in the ThisWorkbook or sheet modules

--
Don Guillett
SalesAid Software

"Charles" wrote in message
...
After a number of macros are run in Excel I have code, as shown below, to
remove the VBA.

The problem I am having is that when the .xls is emailed, the emails is
being bounced from anti-virus systems saying that "vb script is detected".

When I go into the VB Script I see the "VBProject(Filename.xls)".
Although
there is nothing in it, I am wondering if this is causing the problems.

When I try to remove the VBProject by right clicking, the "Remove" is not
highlighted. I have checked off "trust vb script" as a preference in
excel.

The code is

Dim VBComp As VBComponent
Set VBComp = ThisWorkbook.VBProject.VBComponents("Module2")
ThisWorkbook.VBProject.VBComponents.Remove VBComp
End Sub

Note that the actual Module is removed, however, something in the
anti-virus
firewalls are picking up script.

Please advise of how to permanentlly remove.





charles

Removal of VBA from Excel not working
 
All of the tabs in the .xls that are in ThisWorkbook are also empty.


"Don Guillett" wrote:

How about code in the ThisWorkbook or sheet modules

--
Don Guillett
SalesAid Software

"Charles" wrote in message
...
After a number of macros are run in Excel I have code, as shown below, to
remove the VBA.

The problem I am having is that when the .xls is emailed, the emails is
being bounced from anti-virus systems saying that "vb script is detected".

When I go into the VB Script I see the "VBProject(Filename.xls)".
Although
there is nothing in it, I am wondering if this is causing the problems.

When I try to remove the VBProject by right clicking, the "Remove" is not
highlighted. I have checked off "trust vb script" as a preference in
excel.

The code is

Dim VBComp As VBComponent
Set VBComp = ThisWorkbook.VBProject.VBComponents("Module2")
ThisWorkbook.VBProject.VBComponents.Remove VBComp
End Sub

Note that the actual Module is removed, however, something in the
anti-virus
firewalls are picking up script.

Please advise of how to permanentlly remove.







All times are GMT +1. The time now is 09:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com