thespeculata
04-06-2011, 12:06 AM
I am struggling to find the code to paste data that has been selected.
Below is the code and am happy for comments
'Go to A1 and select all data
ActiveSheet.Range("A1").Select
ActiveSheet.Range(Selection, Selection.Columns(3)).EntireColumn.Select
'Copy selected cells
Selection.Copy
'Go to tab to paste data
Sheets("TB-" & Worksheets("Menu").Range("D12")).Select
ActiveSheet.Range("A4").Select
ActiveSheet.Selection.Paste
I have tried the following and others but not sure where I'm going wrong
1>
Selection.PasteSpecial Paste:=xlValues
2>
ActiveSheet.PasteSpecial xlPasteValues
3>
Set Worksheets("TB-" & Worksheets("Menu").Range("D12")) = ActiveSheet
ActiveSheet.Range("A4").PasteSpecial Paste:=xlPasteValues
Cheers
Below is the code and am happy for comments
'Go to A1 and select all data
ActiveSheet.Range("A1").Select
ActiveSheet.Range(Selection, Selection.Columns(3)).EntireColumn.Select
'Copy selected cells
Selection.Copy
'Go to tab to paste data
Sheets("TB-" & Worksheets("Menu").Range("D12")).Select
ActiveSheet.Range("A4").Select
ActiveSheet.Selection.Paste
I have tried the following and others but not sure where I'm going wrong
1>
Selection.PasteSpecial Paste:=xlValues
2>
ActiveSheet.PasteSpecial xlPasteValues
3>
Set Worksheets("TB-" & Worksheets("Menu").Range("D12")) = ActiveSheet
ActiveSheet.Range("A4").PasteSpecial Paste:=xlPasteValues
Cheers