![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:48 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com