Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I receive this error when i run this macro from Excel 2000 spanish
version, but no when i run 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).Select Range(s_range).Select Selection.Copy Sheets(i_end_sheet_index).Select Range(s_range2).Select ActiveSheet.Paste '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 thanks |
#2
![]() |
|||
|
|||
![]()
Where is this code? Is it behind a worksheet module?
If it is, maybe fully qualifying each range would help. But it really isn't really necessary to select objects to work with them: 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 valdesd wrote: I receive this error when i run this macro from Excel 2000 spanish version, but no when i run 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).Select Range(s_range).Select Selection.Copy Sheets(i_end_sheet_index).Select Range(s_range2).Select ActiveSheet.Paste '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 thanks -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
thanks Dave
i'm going to try and i let you Know Thanks Again |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help PLEASE! Not sure what answer is: Match? Index? Other? | Excel Worksheet Functions | |||
How does the PASTE.SPECIAL function work? | Excel Discussion (Misc queries) | |||
Match function...random search? | Excel Worksheet Functions | |||
ClearContents method on a passed range | New Users to Excel | |||
Formula to list unique values | Excel Worksheet Functions |