none
Office 2016 VBA Invalid characters issue RRS feed

  • Question

  • When my Office version is 2010,I created an excel,and contains macro editing content (including Japanese content)。
    When I upgraded Office to 2016, and open this excel again,it shows a hint: invalid characters!Unable to run macros properly!
    Did MS reduce the VBA language support when upgraded office?
    Can there be a solution for the Japanese character macro in 2010 to continue normal use after the upgrade?
    Help···

    Monday, March 26, 2018 8:22 AM

All replies

  • Hi Astraboboy,

    Characters in your screenshot are not Japanese. What language is installed in your Office 2016?
    And I'm afraid you need to provide the code.

    Regards,

    Ashidacchi -- http://hokusosha.com/

    Monday, March 26, 2018 9:15 AM
  • Hello Astraboboy,

    It seems that you are using Chinese version Office. You said that your macro content includes Japanese content. 

    I'm wondering if these Japanese content could still be read in VBE after upgrading. Are they messy code now?

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 27, 2018 2:30 AM
  • PC‘s language is Chinese and I didn't change the language.
    Wednesday, March 28, 2018 1:59 AM
  • Hi Terry

    Yes you are right, my PC and Office are all in Chinese version.

    The macro content includes Japanese content while in office 2010,it shows in messy code but it can run properly.

    When I upgraded office the macro shows in messy code too,and can't run now.

    If I change the PC's Unicode,the macro shows in messy code but can run properly...and then I save the excel.

    Next time I run the excel it works though I change the PC's Unicode back to Chinese.

    In this way I have to change PC's Unicode and restart PC and open the excel and save the excel and change PC's Unicode back and restart the PC again...that's too troublesome....

    Is there a better solution?

     

    Wednesday, March 28, 2018 2:13 AM
  • Hi Astraboboy,

    Please add English language in your Office.

    # Please do not mix up with code/character set (e.g. Unicode) and language (e.g. Chinese, English). The issue is not related with code set, but language.
    And Language in Office is dependent from Display language in Windows. You can Chinese Windows and English Office at the same time, and can change it independently.  

    Regards,

    Ashidacchi -- http://hokusosha.com/


    • Edited by Ashidacchi Wednesday, March 28, 2018 3:14 AM
    Wednesday, March 28, 2018 3:05 AM
  • I've tried to change the office language , but it's no use.

    

    Tuesday, April 3, 2018 2:09 AM
  • Hi Astraboboy,

    I'd like to ask you to provide
    (1) your VBA code (sorry, too late),
    (2) architecture of your Excel (32-bit or 64-bit).

    Regards,

    Ashidacchi -- http://hokusosha.com/

    Tuesday, April 3, 2018 5:16 AM
  • Hello Astraboboy,

    Have you tried to refer to below link for help?

    How To Display Foreign Characters In Excel VBE

    Best Regards,

    Terry

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 3, 2018 7:09 AM
  • thank you for helping me,

    1.VBA code should be v7.1(office 2016 pro Excel)

    2.architecture of my Excel is 32-bit

    Monday, April 9, 2018 3:16 AM
  • I know that change Unicode can solve this issue,but my other works can't support this Unicode...
    Monday, April 9, 2018 3:24 AM
  • Hello Astraboboy,

    If your VBE code contains Chinese/Japanese characters, I would suggest you convert Chinese/Japanese characters in your code to English to enable VBE read your code.

    If not, please share a simply database file so we could try to use it to reproduce your issue.

    For sharing the file, you could share it via Cloud Storage, such as  One Drive, and then put the link address here.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Monday, June 11, 2018 1:29 AM
  • OK,thank you,I'll share you my file.

    https://moo123-my.sharepoint.com/:x:/g/personal/mool_moo123_onmicrosoft_com/EU0odCqr4iNDj0xPyHWJdesBZnGO8bkRKaDAF4k9w0VwVg

    Tuesday, June 12, 2018 3:08 AM
  • Hello Astraboboy,

    I failed to download the document, please make sure if it is shared to all the public users.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 12, 2018 3:18 AM
  • Hello Astraboboy,

    As I suggested in previous reply, I would suggest you convert your code to all English code without Chinese/Japanese code and you have also done it in Model 3.  

    However, the code in Module 1 and Module 2 still contains Chinese/Japanese characters. It make VBE fail to compile the project. Once comment out all the code in Module 1 and Module 2, your code should success run.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 12, 2018 7:53 AM