+ Reply to Thread
Results 1 to 2 of 2

Pls help me for data transfer from 1 file to other file?

Hybrid View

  1. #1
    shital shah
    Guest

    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. #2
    Tom Ogilvy
    Guest

    RE: 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


    "shital 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1