Results 1 to 6 of 6
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Encryption Error (xl2000 SR2)

    Deb

    Happy Holidays.

    OK if this workbook application was developed using the US version, chances are you are running into the International localization problems that Excel has. You know for example if a ListBox is used on a form it will have a ListBox1 name, in the US version, but in the French version it will have something that means ListBox in French.

    This is why it is so nice to name your objects something you can understand and use in your code, just as you do variables.

    So to solve this problem you can re-name all these objects to something meaningful, or copy the Excel.OLB (Object Library) file and send it to your International friends.

    There is a lot of info about this topic on the MSKB and you can download a bunch of OLB filed for each version of Excel.

    I suggest you re-name your objects, this way the code will be looking for lbMonths Vs ListBox1, and it will work in all versions.

    HTH.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Encryption Error (xl2000 SR2)

    Thanks for the reply. I always rename the default objects to something more meaningful like 'btnRead', or 'lstStates' . It really bugs me when people don't do that as it makes the code so much harder to read. It seems the problem is actually that the code itself is protected and the user can't even open the workbook. I have sent them two test workbooks to try, one w/o any protection and one with only the code project protected. I'll see what they say. I am also obtaining an international version of Excel to try on another machine.

    It's hard enough to get the same coding working in xl97 and xl2000 now I have to worry about 100 other countries! Yikes! I think I'll go back to C++ programming it was at least more predictable. <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

    Thnx, Deb <img src=/S/compute.gif border=0 alt=compute width=40 height=20>

  3. #3
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Encryption Error (xl2000 SR2)

    I found this error in Excel's help system. It says:

    "I can't open a workbook because it was protected with an encryption scheme that is unavailable. Some workbook protection and encryption features vary depending on the language of the operating system they were created in. Before you can open a protected workbook, you must unprotect it by using the same operating system and language in which it was created.

    For example, if you are using the U.S. English version of Windows and receive a workbook that was protected by using the Danish version of Windows, you can open the workbook only after it is unprotected by using the Danish version."

    There has to be a workaround because I can't possibly have all language versions on my test system and distribute a protected version in each language. This is getting really scary.

    There has to be many people here who develop for users outside of their own country. If I can't solve this then I'll have to totally redesign my VBA apps to not use any code whatsoever which of course drastically changes what features I can offer.

    Thnx, Deb [hairout

  4. #4
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Encryption Error (xl2000 SR2)

    cross-posted <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=vb&Number=101532&page=0&vie w=expanded&sb=5&o=&vc=1>here</A>

    This may be a VBA question... I have an Excel VBA project that works fine in US, no errors but my Europe users are not able to use the workbook at all and are reporting some type of 'encryption' error (that it's not valid in their region). The only protection in the workbook is that some sheets are protected as is the workbook itself and the VBA project code. I do not have any digital signature applied.

    Could it be that the encryption used to protect the sheets on my English US version is conflicting with whatever these guys have? I have requested more info as far as exact message text, when it appears, screen shot, etc.

    Thnx, Deb <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  5. #5
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Encryption Error (xl2000 SR2)

    Deb,

    Maybe you can leave your workbook unprotected and protect some sheets when opening the workbook, using the workbook_open event, like this

    <pre>Private Sub Workbook_Open()
    Sheets("Sheet1").Protect password:="MyPassword"
    End Sub
    </pre>


  6. #6
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Encryption Error (xl2000 SR2)

    Yeh, great idea! <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> That way it'll be protected with whatever scheme their local version of Excel generates.I can then unprotect everythin at workbook_close() to prepare for the next time the workbook is opened. I'll try that now and send a test workbook to my clients.

    I have proved that it is the worksheet/book protection that I do that causes the problems, not the code being protected. I'm off now to call Microsoft to get the patch which has the fix in it (I can't wait for service pack 3 to be released).

    Deb <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

Posting Permissions

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