Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2007

Tip: Looking for answers? Try searching our database.

copy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ranjan.khan@comcast.net - 20 Apr 2007 05:24 GMT
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?
FloMM2 - 20 Apr 2007 08:46 GMT
Ranjan,
Have you thought about linking the two workbooks?
Open both files in excel, minimize both so that both workbooks can sit
side-by-side in the excel frame.
In WKBK5 Column F the first cell that you want to use(F1) type "=" & select
the cell in columnJ in WKBK2 that is the source. Continue with the next cell
in WKBK5 and WKBK2 until complete. This way if numbers are changed in WKBK2
they will automatically change in WKBK5.
Good luck,Hth
Dennis

> Hi,
>
[quoted text clipped - 19 lines]
>
> Why?
Anthony Gaston - 20 Apr 2007 20:11 GMT
Ranjan.Khan,

You could use the following to accomplish this.

=[filename.xls]sheetname!$d$24

The first section is obvious although I should point out that the brackets
establish the file name and the $ give you absolute cell reference. Good
luck.

Signature

Thanks,

Anthony Gaston
agaston@email.uophx.edu
University of Phoenix
"Raise your role in life above your fear of an un-rewarded purpose." AGaston

> Hi,
>
[quoted text clipped - 19 lines]
>
> Why?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.