R
ranjan.khan
Hi,
I am working with 2 workbooks.
I want to copy contents in ColJ from WKBK2 to ColF in WKBK5.
My content contains a lot of text.
Sub CopyAndPaste()
Dim Src, dest
Set Src = Workbooks("WKBK5.xls").Sheets("Sheet1")
Set dest = Workbooks("WKBK2.xls").Sheets("Sheet1")
i = 2
While Src.Cells(i, 1) <> ""
dest.Cells(i, 6) = Src.Cells(i, 10)
i = i + 1
Wend
I get a Runtime Error '1004'
Why?
I am working with 2 workbooks.
I want to copy contents in ColJ from WKBK2 to ColF in WKBK5.
My content contains a lot of text.
Sub CopyAndPaste()
Dim Src, dest
Set Src = Workbooks("WKBK5.xls").Sheets("Sheet1")
Set dest = Workbooks("WKBK2.xls").Sheets("Sheet1")
i = 2
While Src.Cells(i, 1) <> ""
dest.Cells(i, 6) = Src.Cells(i, 10)
i = i + 1
Wend
I get a Runtime Error '1004'
Why?