ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA code disappeared when open workbook in other computer (https://www.excelbanter.com/excel-programming/333467-vba-code-disappeared-when-open-workbook-other-computer.html)

xuanzhiyi

VBA code disappeared when open workbook in other computer
 

Hi all,

I wrote a VBA project in Excel workbook in one computer(WinXP,
Execl97), there are over 10 classes and 5 modules, compiled and tested.


Later, I copy the file to another machine(Win2000, Excel2002), and
tried to open the VBA editor, all classes and modules disappeared! Then
I uninstalled Excel2002 and installed Excel2003, still codes were
missing.

Strange thing is:
1. One of my friends can open the excel file correctly in his
computer(WinXP, Excel2003).
2. I can open some other excel file's VBA code.

Is there anyone met this kind of problem before? all kinds of help are
appreciated.

-Xuan


--
xuanzhiyi
------------------------------------------------------------------------
xuanzhiyi's Profile: http://www.excelforum.com/member.php...o&userid=24863
View this thread: http://www.excelforum.com/showthread...hreadid=384064


Greg Wilson

VBA code disappeared when open workbook in other computer
 
I've heard through this NG that McAfee virusscanner and possibly others can
delete entire modules if it finds code of the type that manipulates the VBA
Project - e.g. InsertLines, DeleteLines etc. A post from June 2, 2005 from
Amedee Van Gasse stated:

Snippet:
And if you have a McAfee virusscanner, it will cheerfully erase any
code module that contains .InsertLines.

--
Amedee Van Gasse using XanaNews 1.17.4.1

Snippet:
Which is no guarantee. I experienced the problem with McAfee, but other
AV may do the same. Perhaps not now but who knows about future versions?

The problem is with .InsertLines (and also with .DeleteLines). Some
macro viruses use this to add their own code to other workbooks. So a
proactive AV may not know the virus yet, but it sees the .InsertLines
activity and it say, better safe than sorry.

If you have a standalone AV, you can perhaps disable this particular
scanning feature. With a managed or network scanner: don't know,
perhaps not.

In My Humble Opinion it is important that not only you know there can
be a problem, but also WHY there can be a problem. That way you can
work around it.

--
Amedee Van Gasse using XanaNews 1.17.4.1


"xuanzhiyi" wrote:


Hi all,

I wrote a VBA project in Excel workbook in one computer(WinXP,
Execl97), there are over 10 classes and 5 modules, compiled and tested.


Later, I copy the file to another machine(Win2000, Excel2002), and
tried to open the VBA editor, all classes and modules disappeared! Then
I uninstalled Excel2002 and installed Excel2003, still codes were
missing.

Strange thing is:
1. One of my friends can open the excel file correctly in his
computer(WinXP, Excel2003).
2. I can open some other excel file's VBA code.

Is there anyone met this kind of problem before? all kinds of help are
appreciated.

-Xuan


--
xuanzhiyi
------------------------------------------------------------------------
xuanzhiyi's Profile: http://www.excelforum.com/member.php...o&userid=24863
View this thread: http://www.excelforum.com/showthread...hreadid=384064



xuanzhiyi[_2_]

VBA code disappeared when open workbook in other computer
 

Hi Greg,

Thanks for this information indeed. However currently I've no NV on my
machine but Zonealarm firewall5.5. Anyway, you remind me there are
other reasons than just excel version differ.

In my weird machine, I have also .NET framework2.0, C#2.0, MSSQL2005,
IIS4, mysql and php running, I self config the services too. Besides I
have OpenOffice1.1 installed. About the MS office family, I customly
installed Word, Excel, Access and PowerPoint2003. Will one of these
reasons cause the code disappeared?

-Xuan


--
xuanzhiyi
------------------------------------------------------------------------
xuanzhiyi's Profile: http://www.excelforum.com/member.php...o&userid=24863
View this thread: http://www.excelforum.com/showthread...hreadid=384064



All times are GMT +1. The time now is 12:18 PM.

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