Hi all - i was given this sheet (which works) however what i'd like to do is just paste the values this code copies so i can keep the destination sheet formatting as is... this code stops at the active.sheet paste line, how can i modify this? TIA
Code:
Private Sub CopyTXT(destSht As Worksheet, sourceWbk As Workbook)
Set destinationWorkbook = ActiveWorkbook
Dim lastRow As Integer
Dim lastColumn As Integer
lastRow = LastRowNumber(sourceWbk.Sheets(1))
lastColumn = lastColNumber(sourceWbk.Sheets(1))
'copy the data
sourceWbk.Activate
sourceWbk.Sheets(1).Range(Cells(1, 1), Cells(lastRow, lastColumn)).Copy
'Open the sheet you're pasting into
destinationWorkbook.Activate
destSht.Activate
'Pick where to paste
lastRow = LastRowNumber(destSht)
Cells(lastRow + 1, 1).Select
ActiveSheet.PasteSpecial xlPasteValues
'clear the clipboard
Application.CutCopyMode = False
'close the current file
sourceWbk.Close
End Sub