VBA Range function suddenly accepts only localized

2019-09-18 15:26发布

I'm using the brazilian-portuguese version of Excel on a Windows 7 also pt-BR. I have a spreadsheet that I use for months in the same machine, same excel version, same etc. and a vba code that worked until today. As far as I know I have changed nothing.

The code was: Range("tabReport[[#All],[Valor]]") Today when i ran the macro it gave me an error: Run-time error '1004': Method 'Range' of object '_Global' failed

After several trial and error I corrected to: Range("tabReport[[#Tudo];[Valor]]")

Notes: 1) "Tudo" is "All" translated to pt-BR. 2) Comma "," became semicolon ";", the equivalent in pt-BR local syntax.

What bugs me is this change from nowhere, that could affect other workbooks. Also I prefer mantain my macro in USA English (Global) syntax mode, so it's easier to google and mantain.

Anyone have a clue about how can I control this behavior?

0条回答
登录 后发表回答