Here is the code I am running, and I now have a few (albeit, simple) problems. The code that I highlighted in red, will take the value from sheet1 where as I need to take it from sheet2, (sheet 2, cell B21 to be specific, not sure how to change the range without using activesheet).
Sub EXPORT()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = Workbooks.Open(Filename:= _
"DailyTotalCount.xls")
Set ws = wb.Worksheets(1)
With ws
nextrow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
End With
With Workbooks(2).ActiveSheet
ws.Cells(nextrow, "A") = Format(Date, "dd-mmm")
.Range("B21").Copy ws.Cells(nextrow, "B")
ws.Cells(nextrow, "C").Value = 1014
End With
wb.Save
wb.Close
Set ws = Nothing
Set wb = Nothing
End Sub
I was able to copy the cell by doing
Worksheets("Sheet2").Range("B21").Copy ws.Cells(nextrow, "B")
but it copied the formula rather than value...
Bookmarks