#1   Report Post  
valdesd
 
Posts: n/a
Default runtime error 1004

I'm having this problem with this code when i try to run this in
spanish version but no in english version:

Public Function gf_CopyPasteData(s_range As String, s_range2 As String,
i_start_sheet_index As Integer, i_end_sheet_index As Integer) As
Integer
'copies data from sheet one sheet to another sheet
If CInt(Range(s_range).Count) = CInt(Range(s_range2).Count) Then
Sheets(i_start_sheet_index).Range(s_range).Copy _
Destination:=Sheets(i_end_sheet_index).Range(s_ran ge2)
'validation passed, both ranges are of the same size
gf_CopyPasteData = 0
Else
'validation failed, both ranges are a different size
gf_CopyPasteData = 1
End If

End Function

somebody said that the problem is because tha row in english is R and
in spanish is L i want to know how can i solve this

thanks

  #2   Report Post  
Member
 
Location: London
Posts: 78
Default

I'm not that au fait with international variations, but perhaps you could try passing the ranges as 'Range' type rather than as 'String' type, so instead of ---Range(s_range).--- and ---Range(s_Range2).--- you would simply use ---s_range.--- and --s_Range2.---

This should mean it won't matter how the address of the ranges turn out to be notated in a 'foreign' version.

BizMark
  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

You may want to try the Spanish newsgroups:
microsoft.public.es.excel

And when you post there, you may want to include your function call that fails.

valdesd wrote:

I'm having this problem with this code when i try to run this in
spanish version but no in english version:

Public Function gf_CopyPasteData(s_range As String, s_range2 As String,
i_start_sheet_index As Integer, i_end_sheet_index As Integer) As
Integer
'copies data from sheet one sheet to another sheet
If CInt(Range(s_range).Count) = CInt(Range(s_range2).Count) Then
Sheets(i_start_sheet_index).Range(s_range).Copy _
Destination:=Sheets(i_end_sheet_index).Range(s_ran ge2)
'validation passed, both ranges are of the same size
gf_CopyPasteData = 0
Else
'validation failed, both ranges are a different size
gf_CopyPasteData = 1
End If

End Function

somebody said that the problem is because tha row in english is R and
in spanish is L i want to know how can i solve this

thanks


--

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
Runtime error '1004' General ODBC error star_lucas New Users to Excel 0 August 29th 05 04:09 PM
runtime error '6' overflow don Setting up and Configuration of Excel 1 July 26th 05 02:52 AM
Help: runtime error - Method seriescollection object_chart failed huangx06 Charts and Charting in Excel 3 July 9th 05 12:27 AM
Runtime error for macro that works in workbook created in Crystal Excel Discussion (Misc queries) 1 June 22nd 05 08:43 PM
Excel 2003 Help Runtime Error Weezay Excel Discussion (Misc queries) 1 January 27th 05 06:57 PM


All times are GMT +1. The time now is 07:31 PM.

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"