Results 1 to 3 of 3

Thread: Transfer data between workbooks VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Neophyte iain88's Avatar
    Join Date
    Apr 2019
    Posts
    4
    Articles
    0
    Excel Version
    office 365

    Transfer data between workbooks VBA

    Hi

    i get an error on my macro below on the top line and cant work out why? wanting to transfer data from one workbook to another, with the data getting added to the bottom of the new list.
    work books attached.

    ------------------------------
    Code:
    Sub MyAmazingMacro()
    
    
    Dim Name As String, Device As String, staffdate As String
    Worksheets("form").Select
    Name = Range("B2")
    Device = Range("C2")
    StartToday = Range("D2")
    Worksheets("asset").Select
    Worksheets("asset").Range ("A1")vba test 1.xlsmvba test 2.xlsx
    If Worksheets("asset").Range("A1").Offset(1, 0) <> "" Then
    Worksheets("asset").Range("A1").End(x1down).Select
    End If
    ActiveCell.Offset(1, 0).Select
    ActiveCell.Value = Name
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Value = Device
    ActiveCell.Offset(0, 2).Select
    ActiveCell.Value = staffdate
    
    
    End Sub
    Last edited by Pecoflyer; 2019-04-26 at 07:27 AM.

Posting Permissions

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