Using VBA I am trying to open another excel workbook and copy a selection from the current workbook to this opened workbook and then close it.
Things were working ok, but now it keeps producing an error on trying to paste the selection to the opened workbook. (Red line in the code below) It says:
runtime error 1004
That command cannot be used on multiple selections
As far as I can see I don't have mutiple selections. Any ideas of what I am doing wrong??
Things were working ok, but now it keeps producing an error on trying to paste the selection to the opened workbook. (Red line in the code below) It says:
runtime error 1004
That command cannot be used on multiple selections
As far as I can see I don't have mutiple selections. Any ideas of what I am doing wrong??
Code:
Set wkbtaxclass = Workbooks.Open(taxfname)
If wkbtaxclass.ReadOnly = True Then wkbtaxclass.Close: GoTo tryagain12
wkbtaxclass.Sheets(1).Cells.Delete
wkbtaxclass.Sheets(1).Activate
Sheet7.Range("B10:C1000").Copy
wkbtaxclass.Sheets(1).Range("A1").Select
[COLOR=red]wkbtaxclass.Sheets(1).Paste
[/COLOR]