Code is below, can anyone tell me why paste special is not working...? I use this same code with xrange and it works fine, then I try to copy paste another set, and I get an error when it gets to
Selection.PasteSpecial xlPasteValues
LastRow = Cells(Rows.Count, 1).End(xlUp).Row 'Gets the lastrow in the active column
LastUsedColumn = Cells(1, Columns.Count).End(xlToLeft).Column + 1 'remove the +1 will go to the last used column
'Code to copy everything from Calculations to the selected Month
Worksheets("Calculations").Activate
Set yrange = Range(Cells(1, LastUsedColumn), Cells(LastRow, 2)) 'set copy range
yrange.Copy
'xrange.select use this to see selection
Worksheets(myValue).Activate 'set worksheet based on user input
LastUsedColumnPaste = Cells(1, Columns.Count).End(xlToLeft).Column + 1 'remove the +1 will go to the last used column
Set yrange = Range(Cells(1, LastUsedColumnPaste), Cells(1, LastUsedColumnPaste)) 'set paste range
yrange.PasteSpecial
Selection.PasteSpecial xlPasteValues
Selection.PasteSpecial xlPasteColumnWidths
Selection.PasteSpecial xlPasteValues
LastRow = Cells(Rows.Count, 1).End(xlUp).Row 'Gets the lastrow in the active column
LastUsedColumn = Cells(1, Columns.Count).End(xlToLeft).Column + 1 'remove the +1 will go to the last used column
'Code to copy everything from Calculations to the selected Month
Worksheets("Calculations").Activate
Set yrange = Range(Cells(1, LastUsedColumn), Cells(LastRow, 2)) 'set copy range
yrange.Copy
'xrange.select use this to see selection
Worksheets(myValue).Activate 'set worksheet based on user input
LastUsedColumnPaste = Cells(1, Columns.Count).End(xlToLeft).Column + 1 'remove the +1 will go to the last used column
Set yrange = Range(Cells(1, LastUsedColumnPaste), Cells(1, LastUsedColumnPaste)) 'set paste range
yrange.PasteSpecial
Selection.PasteSpecial xlPasteValues
Selection.PasteSpecial xlPasteColumnWidths