I have an issue with the following VBA code:
Set timeRange = ActiveSheet.Cells.Find("DATE", MatchCase:=True) 'Cerca TIME column
If timeRange Is Nothing Or Empty Then GoTo errorOpenColumn
timcol = timeRange.Column
Columns(timcol).Select
Selection.NumberFormat = "yyyymmdd"
Selection.Copy
'Workbooks(Mainbook).Activate
'Worksheets("Office_Data_Table").Select
Workbooks(Mainbook).Activate
Worksheets("Office_Data_Table").Activate
Range("A:A").Offset(6, 0).PasteSpecial 'Error aqui
Windows(Sourcebook).Activate
At the time it executes it will give an error in line Range("A:A").Offset(6, 0).PasteSpecial
, but would not give an error (No valid entry. Application will be closed); but if I apply the Offset(0,6)
it will work.
Obviously my problem is that I want to apply the Offset (6,0)
, and not the other one :-).
Any help highly appreciated.