Consulting

Results 1 to 2 of 2

Thread: VB copy & paste help .......pleased

  1. #1
    VBAX Contributor
    Joined
    Jun 2008
    Posts
    169
    Location

    VB copy & paste help .......pleased

    Hi

    Please help with copy external data VB codes as I want to call others xls. File worksheets sheet1 to copy from range A3 to count by blank, than paste it in to active WS range ?A? count by lastRow

    Please help

  2. #2
    VBAX Contributor
    Joined
    Jun 2008
    Posts
    169
    Location
    Deae experts

    Please help as I brian the code as below but it can't be work with prompt errors!!!!,
    can u help me check or learn me which i made a wrong, pleased.

    [VBA]Sub SvLVLc()
    Dim home As Worksheet
    Dim Filename As String
    Dim Wb As Workbook
    Dim Range As Variant



    With Application.FileDialog(msoFileDialogOpen)

    Set home = ActiveWorkbook.ActiveSheet
    .AllowMultiSelect = False
    If .Show = -1 Then
    Filename = .SelectedItems(1)
    Set Wb = Workbooks.Open(Filename)
    home.Cells(Rows.Count, "A").End(xlUp).Offset(1).PasteValues.Value = Wb.Worksheets("sheet1").Range("A3" & .Cells(.Rows.Count, "A").End(xlUp).Row).Copy


    Wb.Close (False)

    End If
    End With
    End Sub
    [/VBA]

Posting Permissions

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