'Range Copy from another sheet
So I'm new on vba and I'm trying to copy the values from a different sheet, the data is a part of a colum so I get the column number from the original sheet with a match and the row number froma count function.
when i run the code
Dim numDatos As Integer
Dim numCol As Integer
Dim datosCopiar As Range
numDatos = Range("A1").Offset(1, 0).CurrentRegion.Rows.Count
numCol = Application.Match(CLng(CDate(fecha)), Worksheets("W1").Range("BG9:CV9"), 0)
datosCopiar = Range(Worksheets("W1").Cells(11, numCol), Worksheets("W1").Cells(numDatos, numCol))
datosCopiar.Copy Worksheets("final").Range("M3")
Runtime Error 1004: Application-defined or object-defined error
in the range definition line
"final" is the active sheet and "W1" is the datasheet
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
