Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Language issue using excel (ref to sheets)

Status
Not open for further replies.

Mikeb1970

Technical User
Nov 14, 2003
101
0
0
BE
Hi all,

In my company we use two different versions of excel, the english version, and the dutch version, spread about 50% for each.
Now when i lett me code run, it works great for the users using the englisch version, but it has problems on the dutch version when i try to select a sheet, since in englisch they called sheets and in dutch the get called "blad". What i could do is write some onerror code, but prefer first to see if there are any better solutions around, since i don't like using this.

all ideas are very helpfull, thnx in advance

Mike
 
Which version of Excel ?
For me, since office 2000, the object model isn't localised ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
using office 2003 on most computers, they once not using 2003 should not be considered,they need to get updated

Mike
 
BTW you may consider to play with the CodeName property ...

Could you please post some code exhibiting your issue ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Maybe i need to explain this somewhat better, we have a programm that returns 192 parameters from our machine (continuous steel casting), where i can select 8 of those parameters to copy to excel, so they fill a worksheet, i then have an excel file what users need to open,which contains on open code, and then starts to analyze the data also opening another file and then switching back and forth copying the data needed to go on with my calculations, the swithing betweend the files causes the problems, because of the language issues,

Application.DisplayAlerts = False
Workbooks("Stilstandtijden KG V2 01.xls").Close
Application.DisplayAlerts = True
Workbooks("Book1").Sheets("Sheet1").Activate

the displayalerts is turned off because i do not want users to get a message for saving the changes,when closing the file, then i turn it back on,
then the problem occurs, since on computers with the dutch version sheet1 is called "blad1"

Hope you understand what i mean, and can help me, thnx sofar anyway

Mike
 
And what about this ?
Workbooks("Book1").Sheets(1).Activate

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PHV,

Took me some time to understand what you mean't, even see the difference between my code and yours, but it is indeed the answer to this problem.
Just need to reference the worksheet as a number (each worksheet has a number (can be viewed in VBA, between brackets)).
Thnx for your help PHV

with regards

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top