Good evening friends. I have a really stupid request to which I can't find the correct solution. I need to insert, in the procedure that you can see below, the ".PasteSpecial xlPasteValues" parameter in the correct way, to have only values to be pasted in the destination workbook. The below procedure works fine and I would not change it if possible, but integrate it with the parameter mentioned above. Unless I change the code and use other solutions. I repeat, the code below is now tested and I use it safely, but now the need to paste the cell format and validations of the original workbook is no longer needed.
Thanks for any suggestions.
Edit:
I'll try to be clearer. I know there are similar requests already resolved. My question is where to put the ".PasteSpecial xlPasteValues" parameter correctly in the procedure that I use already. The other solutions do not paste data into a table, while I use a source and destination table.
Public Sub CopyOnMasterDB ()
Dim CopyFrom As Range
Dim Copyto As Range
Set CopyFrom = Workbooks ("FromFile.xlsm"). Worksheets ("Database"). UsedRange.Offset (2, 0)
Set Copyto = Workbooks ("MASTER_DATABASE.xlsx"). Worksheets (1) .Range ("A" & Rows.count) .End (xlUp) .Offset (1, 0) 'Error If I insert .PasteSpecial xlPasteValues
CopyFrom .Copy Destination: = Copyto 'Error If I insert .PasteSpecial xlPasteValues
Application.CutCopyMode = False
Workbooks ("MASTER_DATABASE.xlsx"). Close SaveChanges: = True
End Sub