I'm attempting to use a macro that will autofill cells within sheet 'Logs'. Here is the macro I have created.
Sub LogsOne()
Application.ScreenUpdating = False
Sheets("Logs").Visible = True
Sheets("Logs").Activate
lastRow = Range("D2").End(xlDown).Row
Range("A2:C2").AutoFill Destination:=Range(Range("A2"), Range("C" & lastRow))
Sheets("Logs").Visible = False
Application.ScreenUpdating = True
End Sub
When I run this macro, it works OK, but redirects to another sheet while hiding sheet 'Logs' upon completion. I have no idea why this would be happening.
Also, if anyone could add to this code in order to paste values of the cells after they are filled, that would help me a lot. (Mods: If I'm breaking a rule by asking 2 questions I apologize, didn't see anything about that within the rules).
Bookmarks