Results 1 to 2 of 2

DAta transfer

Threaded View

karuna85.k DAta transfer 12-17-2010, 01:27 PM
6StringJazzer Re: DAta transfer 12-17-2010, 05:49 PM
  1. #1
    Registered User
    Join Date
    09-13-2009
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    7

    Unhappy DAta transfer

    Hi ,

    I have the two files. in BOOK1.xlsone file I have data in table format with certain colums....
    i want tranfer table data to check.xls file to paste in certain cells.

    i created the macro, however i'm getting error meesge as Runtime error 9, Subscript out of range.
    please help me out.


    Sub chekcon()
    Dim check, book1 As Workbook
    Dim wk1, wk2 As Worksheet
    Dim i As Integer
    Dim lstrw As Integer
    Set book1 = ThisWorkbook
    Set check = Workbooks("Z:\66205_TEMPLATES_20996\Check Control Processing Form-XX-XX-XXXX.XLS")
    Set wk1 = book1.Worksheets("sheet1")
    Set wk2 = check.Worksheets("sheet1")
    lstrw = book1.Cells(65530, 1).End(xlUp).Row
    For i = 2 To lstrw
    book1.Cells(i, 1).Value = check.Cells(3, 3).Value
    book1.Cells(i, 2).Value = check.Cells(11, 5).Value
    book1.Cells(i, 3).Value = check.Cells(1, 4).Value
    book1.Cells(i, 4).Value = check.Cells(1, 10).Value
    book1.Cells(i, 5).Value = check.Cells(13, 5).Value
    book1.Cells(i, 5).Value = check.Cells(3, 6).Value
    book1.Cells(i, 6).Value = check.Cells(11, 10).Value
    book1.Cells(i, 7).Value = check.Cells(3, 11).Value
    book1.Cells(i, 8).Value = check.Cells(43, 4).Value
    book1.Cells(i, 9).Value = check.Cells(45, 4).Value
    fn = book1.Cells(i, 10).Value
    check.SaveAs Filename:="Z:\66205_TEMPLATES_20996\" & fn
    Next i
    End Sub


    Attached Files Attached Files
    Last edited by karuna85.k; 12-19-2010 at 07:17 AM. Reason: solved

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