I'm having trouble executing my code on multiple sheets at once and I'm hoping someone can shed some light. I run my below code on 4 sheets at once and it works great except for the last line of code that is supposed to drag a formula. The whole code will run on all 4 pages except the last line will only run on the sheet I'm currently viewing. Does anyone know why this is, or how I can force the code to execute the last line on all selected sheets? Below is the code I'm working with. Thank you!
Sub ChargeRent()
'selects first empty cell in tenant ledger
'keyboard shortcut = ctrl+q
ActiveSheet.Range("a8").End(xlDown).Offset(1, 0).Select
Dim todays_date As Date
todays_date = Range("F1")
If todays_date >= "1 / 1 / 17" And todays_date <= "1 / 31 / 17" Then
'inputs date as first of the month and charges rent in appropriate cell
ActiveCell.FormulaR1C1 = "='Jan-17'!R100C[3]-DAY('Jan-17'!R100C[3])+1"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "Rent"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(R6C[-1],'Jan-17'!R3C[8]:R6C[10],2,FALSE)"
ActiveSheet.Range("e8").End(xlDown).Select
Selection.Resize(2).FillDown