Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script problem on excel spanish version
I have an excel macro under microsoft excel 2003 sp2 in spanish version that
have a strange behaviour. the macro is this: Sub Macro1() Dim keyinizio As String keyinizio = "START" Dim myExcel As Object Set myExcel = CreateObject("Excel.Application") myExcel.Visible = True myExcel.WindowState = -4143 myExcel.Workbooks.Add myExcel.ActiveWorkbook.Names.Add Name:=keyinizio, RefersToR1C1:="=Hoja1!R1C1:R1C1" MsgBox myExcel.ActiveWorkbook.Names(1) myExcel.Goto (keyinizio) End Sub The message box return this value: =Hoja1!'R1C1':Hoja1!'R1C1' So the GoTo instruction rise an error "Run-time error 1004: not valid reference" The correct value that expect in ActiveWorkbook.Names should be =Hoja1!'$A$1' This behaviour happend only spanish version, with the italin and english version all works fine Thanks Giulio |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script problem on excel spanish version
Maybe it's the international differences that are used for R(ow) and C(olumn).
myExcel.ActiveWorkbook.Names.Add Name:=keyinizio, _ RefersTo:="=Hoja1!A1" or just name the range itself. worksheets("hoja1").range("a1").name = keyinizio Giulio wrote: I have an excel macro under microsoft excel 2003 sp2 in spanish version that have a strange behaviour. the macro is this: Sub Macro1() Dim keyinizio As String keyinizio = "START" Dim myExcel As Object Set myExcel = CreateObject("Excel.Application") myExcel.Visible = True myExcel.WindowState = -4143 myExcel.Workbooks.Add myExcel.ActiveWorkbook.Names.Add Name:=keyinizio, RefersToR1C1:="=Hoja1!R1C1:R1C1" MsgBox myExcel.ActiveWorkbook.Names(1) myExcel.Goto (keyinizio) End Sub The message box return this value: =Hoja1!'R1C1':Hoja1!'R1C1' So the GoTo instruction rise an error "Run-time error 1004: not valid reference" The correct value that expect in ActiveWorkbook.Names should be =Hoja1!'$A$1' This behaviour happend only spanish version, with the italin and english version all works fine Thanks Giulio -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spanish version for Excel 2003 training? | Excel Discussion (Misc queries) | |||
i've spanish version of excel-how do I change funtions to english | Excel Worksheet Functions | |||
sumproduct spanish version | Excel Worksheet Functions | |||
What is Keyboard Shortcut in Spanish version of Excel? | Excel Discussion (Misc queries) | |||
writting excel formulas in english in spanish version of office. | Excel Programming |