ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code to set NamedRange for all application-Languages (https://www.excelbanter.com/excel-programming/306091-code-set-namedrange-all-application-languages.html)

Filips Benoit

Code to set NamedRange for all application-Languages
 
Dear All,

Can I change my code so it is not depending from the Application-LanguageId
??

Select Case
Application.LanguageSettings.LanguageID(msoLanguag eIDInstall)
Case Is = 1033
ActiveWorkbook.Names.Add Name:="ImportBereik", RefersToR1C1:= _
"='SHEET1'!R1C1:R" & CStr(iLastRow) & "C9"
Case Is = 2067
ActiveWorkbook.Names.Add Name:="ImportBereik", RefersToR1C1:= _
"='BLAD1'!R1C1:R" & CStr(iLastRow) & "C9"
Case Else
End Select


Thankx,

Filip



Filips Benoit

Code to set NamedRange for all application-Languages
 
Sorry, a stupid question!

Renaming the activesheet solves the problem !!

ActiveSheet.Name = "OFFERTE"
ActiveWorkbook.Names.Add Name:="ImportBereik",
RefersToR1C1:="='OFFERTE'!R1C1:R" & CStr(iLastRow) & "C9"

Filip

"Filips Benoit" wrote in message
...
Dear All,

Can I change my code so it is not depending from the

Application-LanguageId
??

Select Case
Application.LanguageSettings.LanguageID(msoLanguag eIDInstall)
Case Is = 1033
ActiveWorkbook.Names.Add Name:="ImportBereik", RefersToR1C1:=

_
"='SHEET1'!R1C1:R" & CStr(iLastRow) & "C9"
Case Is = 2067
ActiveWorkbook.Names.Add Name:="ImportBereik", RefersToR1C1:=

_
"='BLAD1'!R1C1:R" & CStr(iLastRow) & "C9"
Case Else
End Select


Thankx,

Filip






All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com