Stop Symantec AV from quarantine my VBA

  • Thread starter EagleOne@microsoftdiscussiongroups
  • Start date
E

EagleOne@microsoftdiscussiongroups

Excel 2003 up to date

What type of commands in Excel VBA does NAV assume relate to the Bloodhound
Macro Virus.

I assume that it does not like any command that deletes files - but there
may be others.

Can anyone help me strip my Personal.xls of VBA commands which causes NAV to
delete the file?

Any ideas? Plea..........se!

EagleOne
 
J

Jim Cone

In earlier versions of NAV that I have seen, there is an option to disable/omit scanning of
office apps. Suggest you seriously consider doing that.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"EagleOne@microsoftdiscussiongroups"
wrote in message
What type of commands in Excel VBA does NAV assume relate to the Bloodhound
Macro Virus.
I assume that it does not like any command that deletes files - but there
may be others.
Can anyone help me strip my Personal.xls of VBA commands which causes NAV to
delete the file?
Any ideas? Plea..........se!
EagleOne
 
D

Dave Peterson

You have responses at your other post.

EagleOne@microsoftdiscussiongroups said:
Excel 2003 up to date

What type of commands in Excel VBA does NAV assume relate to the Bloodhound
Macro Virus.

I assume that it does not like any command that deletes files - but there
may be others.

Can anyone help me strip my Personal.xls of VBA commands which causes NAV to
delete the file?

Any ideas? Plea..........se!

EagleOne
 
R

RB Smissaert

I had this problem with McAfee and it objected to using Microsoft Visual
Basic for Applications Extensibility 5.x.
The answer was to remove that reference, use late binding and also move the
code to a VB6 ActiveX dll and call it from VBA.
So in my VB6 class I have for example:

Public Function ImportCode(oVBCodeMod As Object, _
strFile As String) As Boolean

On Error GoTo ERROROUT

oVBCodeMod.AddFromFile strFile

Sleep 100
DoEvents

ImportCode = True

Exit Function
ERROROUT:

End Function

All very simple and working very well.


RBS

"EagleOne@microsoftdiscussiongroups"
 
E

EagleOne@microsoftdiscussiongroups

Thanks for all who responded.

As it turned out NAV was not quarantineing VBA just due to ..... Ref to
extensibility... or Delete Files or Kill ... etc.

The code below has been doctored for file paths and some filenames to
protect the innocent. The code is presented only for comments as to the
essence of the commands used.

My guess is that the trigger for the NAV to Quarantineing(sp) is the usage
of the word FileSystem.xxxxxx

NOTE: I commented out the following code and NAV stopped grabbing the file!

Any other thoughts??

**********************************

Sub PersonalMacroFileSave()

ActiveWorkbook.SaveCopyAs "C:\Personal.xls"
ChDir "C:\XXXXX"
FileSystem.FileCopy "C:personal.xls", "C:personal.xls"
ChDir "C:\Program Files\Microsoft Office\Office11\XLSTART\"
With Application
.ScreenUpdating = False
.DisplayAlerts = False
End With
On Error Resume Next
Workbooks("VB_Tools.xla").Activate
Workbooks("VB_Tools.xla").IsAddin = False
Windows("VB_Tools.xla").Visible = True
Workbooks("VB_Tools.xla").SaveAs FileName:="C:\VB_Tools Save.xla", _
FileFormat:=xlAddIn8
Workbooks("VB_Tools.xla").Close
On Error Resume Next
FileSystem.FileCopy "C:\VB_Tools.xla", "D:\Excel Information\VB_Tools.xla"
On Error Resume Next
FileSystem.FileCopy "C:\VB_Tools.xla", "C:\Transfer\VB_Tools.xla"
On Error Resume Next
FileSystem.FileCopy "C:\VB_Tools.xla", "F:\Hold\VB_Tools.xla"
On Error Resume Next
FileSystem.FileCopy "C:\VB_Tools.xla", "C:\Transfer\VB_Tools Save.xla"
On Error Resume Next
FileSystem.FileCopy "C:\Excel Information\VB_Tools.xla", "\VB_Tools.xla"
On Error Resume Next
FileSystem.FileCopy "C:\Excel Information\VB_Tools.xla", "\VB_Tools.xla"
Windows("PERSONAL.XLS").Visible = True
Workbooks("PERSONAL.XLS").Activate
Workbooks("PERSONAL.XLS").Save
Workbooks("PERSONAL.XLS").SaveAs "C:\Personal.xls", FileFormat:=xlExcel8
Workbooks("PERSONAL.XLS").SaveAs "C:\Transfer\Personal.xls",
FileFormat:=xlExcel8
Workbooks("PERSONAL.XLS").SaveAs "C:\Personal.xls", _
FileFormat:=xlExcel8
Windows("PERSONAL.XLS").Visible = False
With Application
.ScreenUpdating = True
.DisplayAlerts = True
End With
MsgBox "Process Completed! Press OK to Continue"

End Sub

TIA EagleOne
 
R

RB Smissaert

How about leaving FileSystem. out?
You don't need it, So, do:
FileCopy FileA, FileB

RBS



"EagleOne@microsoftdiscussiongroups"
 
E

EagleOne@microsoftdiscussiongroups

Excellent Point!

RB Smissaert said:
How about leaving FileSystem. out?
You don't need it, So, do:
FileCopy FileA, FileB

RBS



"EagleOne@microsoftdiscussiongroups"
 
E

EagleOne@microsoftdiscussiongroups

RB

FYI: That was not a working solution. I did delete all references to
FileSystem.
leaving only FileCopy and NAV got back to its old tricks.

I am making this comment only for documentation purposes for others who may
have a problem in the future.

EagleOne
 
R

RB Smissaert

If you have access to VB then you could always make a little dll that
will do the FileCopy for you. It would only need a class with one Public
Sub.
Something like:

Public Sub FC(strSourcePath As String, strTargetPath As String)
FileCopy strSourcePath, strTargetPath
End Sub

If you compile with GlobalMultiUse in VB then you can do in VBA:

FC "C:personal.xls", "C:personal.xls"

and NAV would be happy and leave your file alone.


RBS

"EagleOne@microsoftdiscussiongroups"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top