I have a workbook coded to collect info from it and transfer the data to a summary workbook. The code works when collecting the data but it prints the data to workbook the data is collected from, not the summary workbook. Its weird because it opens the summary workbook and even counts the row so the data will go to the first empty row. Can someone tell me what I'm doing wrong?
Dim WB1 as workbook
Dim MyData as workbook
Dim Assignment as string
Dim RowCount as integer
Set WB1 = ThisWorkbook
Assignment = Cells(45, "C")
WB1.Save
Set Mydata= Workbooks.Open (*File path to summary data document*)
MyData.Worksheets("Sheet1").Select
Worksheets("Sheet1").Range("a1").Select
RowCount = Worksheets("Sheet1").Cells(Rows.Count, "c").End(xlUp).Row + 1
With MyData.Worksheets("Sheet1").Range("A1")
Cells(RowCount, "b") = Assignment
End With
MyData.Save
End Sub