I need help with a Macro I created to automate some processes.
MSQuery populates in worksheet 1
Data is copied and pasted into first open cell of worksheet 2 when I get to the paste portion I receive: runtime error '1004' "The information cannot be pasted because the Copy area and the aste area are not.....".
I am using this for multiple worksheets
My code is below.
Sub REFRESH()
Sheets("import_DataSet1").Visible = True
ActiveWorkbook.RefreshAll
Sheets("import_DataSet1").Select
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("Data Paste").Select
Range("B2").Select
Selection.End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
Moderator's Edit: Use code tags whenever you post code in posts. To do so, either select your code and click the # button above or type [code] before your code and [/code] after it.
Bookmarks