Results 1 to 1 of 1

Sheet code to copy & paste a new row of Info to another sheet

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Sheet code to copy & paste a new row of Info to another sheet

    Good day all,

    I have a userform that once completed uses a command button to send all data to a record sheet ("Form") into a single Row format, It is then assigned a unique number, however I also require this data, in single Row, to be sent from ("Form" - A1:01) to a second sheet ("SWMS" - A1:01), please see my code below & as always any assistance would be greatly appreciated, thank you all & have a great day - Marco

          Private Sub cmdProcess_Click()
              Dim LastRow As Object
    
    Set LastRow = Sheets("Form").Range("a65536").End(xlUp)
     Sheets("Form").Unprotect Password:="000"
            LastRow.Offset(1, 0).Value = TextBox1.Text
            LastRow.Offset(1, 1).Value = TextBox2.Text
            LastRow.Offset(1, 2).Value = TextBox3.Text
            LastRow.Offset(1, 3).Value = TextBox4.Text
            LastRow.Offset(1, 4).Value = TextBox5.Text
            LastRow.Offset(1, 5).Value = TextBox6.Text
            LastRow.Offset(1, 6).Value = TextBox7.Text
            LastRow.Offset(1, 7).Value = TextBox8.Text
            LastRow.Offset(1, 8).Value = TextBox9.Text
            LastRow.Offset(1, 9).Value = TextBox10.Text
            LastRow.Offset(1, 10).Value = TextBox11.Text
            LastRow.Offset(1, 11).Value = ComboBox1.Text
            LastRow.Offset(1, 13).Value = TextBox12.Text
            LastRow.Offset(1, 14).Value = TextBox13.Text
     Sheets("Form").Protect Password:="000"
              MsgBox "SWMS Processed"
    
          End Sub
    Last edited by matrixpom; 10-23-2012 at 05:37 PM. Reason: More Detail

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