importing selected cells info to an other tab

Microsoft Office excel 2007 home & stude...
May 11, 2010 at 18:35:54
Specs: Windows XP Pro
I have a spreadsheet that I use as a workorder / invoice. I have added a print button that when clicked it updates the wo number and date, then prints the wo, then clears the cells . I need to save certain info from this work order as a running log in another tab of the workbook.I need the info saved and when the print button is clicked for the next workorder save the info on the next row of the other tab...

Thanks in advance for the help!


See More: importing selected cells info to an other tab

May 12, 2010 at 00:03:41
You didn't give us any specific information to work with, so the best we can offer is a generic solution.

This code will copy Sheet1!C3:F7 to the next open row in Sheet2 Column A.

Option Explicit
Sub CopyRange()
Dim lstRw As Integer
'Determine last used row in Sheet2 Column A
 lstRw = Sheets(2).Range("A" & Rows.Count).End(xlUp).Row
'copy range
 Sheets(1).Range("C3:F7").Copy Destination:=Sheets(2).Range("A" & lstRw + 1)
End Sub

Report •
Related Solutions

Ask Question