Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Pls help me for data transfer from 1 file to other file?

Hi to all
I have 2(two) file. 1 is jobdata.xls and 2 is jobover.xls

What i do is when my work is over for jobdata file i cut some rows and
tranfer to jobover files.

Is there any way can i do, it will ask me rows no. and which ever row i enter
it should automatically transfer to jobover file even jobover file is not
open.

and next time it should go below next row in jobover file.

Is this Possible.
Any Help

thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Pls help me for data transfer from 1 file to other file?

Sub copyData()
dim rng as Range, rng1 as Range
dim sh as Worksheet, bk as Workbook
dim bBkOpen as Boolean
set sh = Activesheet
if lcase(sh.parent.name) < "jobdata.xls" then
msgbox "Activate Job sheet"
exit sub
End if
Application.ScreenUpdating = False
On Error Resume Next
set bk = Workbooks("jobover.xls")
On Error goto 0
if bk is nothing then
set bk = Workbooks.Open("C:\Myfolder\jobover.xls")
Else
bBkOpen = True
end if
set rng1 = bk.worksheets(1).Cells(rows.count,1).End(xlup)(2)
sh.Activate
Application.ScreenUpdating = True
On Error Resume Next
set rng = application.Inputbox("Use Mouse to select rows to copy", _
Type:=8)
On Error goto 0
if rng is nothing then
bk.close Savechanges:=False
exit sub
Endif
rng.Entirerow.copy Destination:=rng1
if not bBkOpen then
bk.close Savechanges:=True
else
bk.Save
End if
End Sub

--
Regards,
Tom Ogilvy


"****al shah" wrote:

Hi to all
I have 2(two) file. 1 is jobdata.xls and 2 is jobover.xls

What i do is when my work is over for jobdata file i cut some rows and
tranfer to jobover files.

Is there any way can i do, it will ask me rows no. and which ever row i enter
it should automatically transfer to jobover file even jobover file is not
open.

and next time it should go below next row in jobover file.

Is this Possible.
Any Help

thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer data from one file to another jmj713 Excel Discussion (Misc queries) 4 February 5th 08 07:12 PM
Is transfer data from one Excel file to another possible? EA Excel Discussion (Misc queries) 2 October 19th 07 04:01 PM
How transfer data from one file to another other with VBA JK Excel Programming 0 March 13th 06 11:57 PM
How do I transfer data in a pdf file into an excel workbook? CBooze1969 Excel Discussion (Misc queries) 2 April 19th 05 04:18 PM
Use ADO to transfer data from open excel file to closed excel file JCanyoneer Excel Programming 1 April 1st 05 07:41 AM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"