Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spanish version for Excel 2003 training? mault Excel Discussion (Misc queries) 0 October 15th 09 05:04 PM
i've spanish version of excel-how do I change funtions to english Marcel Excel Worksheet Functions 0 December 10th 08 10:19 PM
sumproduct spanish version Desiree Excel Worksheet Functions 3 July 11th 07 03:43 PM
What is Keyboard Shortcut in Spanish version of Excel? daljaxon Excel Discussion (Misc queries) 3 July 1st 07 12:52 PM
writting excel formulas in english in spanish version of office. Edge Excel Programming 0 August 26th 05 11:09 PM


All times are GMT +1. The time now is 04:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"