Hi I have a question about clearing and pasting a selection from another workbook.
I am trying to make a macro that clears the old data I have in a tab and copies the data I have on my clipboard from another excel workbook in it's stead.
I kept getting an error before I noticed what was wrong. When the macro runs the clearing part, it cancels my selection/copy data I had, so the pasting part does not work. does anybody know how to circumvent it? I can't reference the excel where the data is coming from directly because it varies every time.
the code I use now for the clearing:
Sub clearData()
Worksheets("ZRFI08TW").Range("A5:M5000").ClearContents
End Sub
The coded i use now for the pasting of the data (i know its not the best, but trying different things before i noticed the conflict ended up with this one):
Sub copyData()
ActiveSheet.Range("A5").Select
SendKeys "^v"
End Sub