+ Reply to Thread
Results 1 to 3 of 3

VBA code disappeared when open workbook in other computer

  1. #1
    Registered User
    Join Date
    07-02-2005
    Posts
    2

    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

  2. #2
    Greg Wilson
    Guest

    RE: 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
    >
    >


  3. #3
    Registered User
    Join Date
    07-02-2005
    Posts
    2
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1