Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Language settings
Hi,
I have an application I'm trying to execute in a norwegian version of Excel (XP). It fails when coming to a statement involving a Application.Worksheetfunction object. I suspect this has to do with language as it works when using an english version of Excel. Is there some way around this to make the app independent of language setting for Excel? Any help appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Language settings
Hei Jacob
Post the troublesome code please. Application.Worksheetfunction should not be a problem. -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please "jacob" skrev i melding ... Hi, I have an application I'm trying to execute in a norwegian version of Excel (XP). It fails when coming to a statement involving a Application.Worksheetfunction object. I suspect this has to do with language as it works when using an english version of Excel. Is there some way around this to make the app independent of language setting for Excel? Any help appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Language settings
"jacob" skrev i melding
... Hi, Think I found the error. Had moved some code from a general module to a worksheet module. (...) Is it so that code residing within a worksheet module only looks for named ranges within that sheet unless you specify otherwise? Probably. Sheet code has limited access to remote objects. Glad you found the error. Best wishes Harald Excel MVP Followup to newsgroup only please |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Language settings
Makes my day. Thx for taking the time.
-----Original Message----- Assume you are in the sheet1 module and your named range "NamedRange" refers to Sheet2 in the sheet1 module if you use vVal = Range("NamedRange") then this is interpreted to mean worksheets("Sheet1").Range("NamedRange") which causes an error. Any unqualified references are interpreted to refer to the sheet associated with the sheet module. Worksheets("Sheet2").Activate Range("A1").Select would cause an error since Range("A1").Select would refer to sheet1 which is not active. if it had been Range("A1").Value = 3, then A1 on sheet 1 would be changed, not A1 on sheet2 as probably intended. -- Regards, Tom Ogilvy "jacob" wrote in message ... Hi, Think I found the error. Had moved some code from a general module to a worksheet module. Appears that I need to qualify Range("NamedRange") with Worksheets ("NameOfSheet") where "NamedRange" reside. Is it so that code residing within a worksheet module only looks for named ranges within that sheet unless you specify otherwise? The code which did not work in worksheetmodule: SpecNamePosInList = Application.WorksheetFunction.Match (sSpecName, Range("SpecName"), 0) The one that worked: SpecNamePosInList = Application.WorksheetFunction.Match (sSpecName, Worksheets("System Defined Tables").Range ("SpecName"), 0) Thx for your time -----Original Message----- Hei Jacob Post the troublesome code please. Application.Worksheetfunction should not be a problem. -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please "jacob" skrev i melding ... Hi, I have an application I'm trying to execute in a norwegian version of Excel (XP). It fails when coming to a statement involving a Application.Worksheetfunction object. I suspect this has to do with language as it works when using an english version of Excel. Is there some way around this to make the app independent of language setting for Excel? Any help appreciated. . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Different Language Settings... | Excel Worksheet Functions | |||
Right to Left sorting without changing language settings | Excel Discussion (Misc queries) | |||
Eliminating default language settings to all Office 2003 apps. | Excel Discussion (Misc queries) | |||
excel language settings/cell format | Excel Discussion (Misc queries) | |||
override language settings on date | Excel Discussion (Misc queries) |