I have a macro that calls another macro whenever i open the excel file but sometimes, I get this "Runtime Error 13 Type Mismatch" message.
What does this exactly mean?
Can someone help me what the issue is with the coding?
What does this exactly mean?
Can someone help me what the issue is with the coding?
Code:
Sub Auto_Open()
Call auto_refresh
End Sub
Sub auto_refresh()
' execute macros
Range("D18").Select
ActiveCell.FormulaR1C1 = "=countfilesif(R[-8]C,R[-8]C[3],FALSE,R[-8]C[5])"
Range("D19").Select
ActiveCell.FormulaR1C1 = "=countfilesif(R[-8]C,R[-8]C[3],FALSE,R[-8]C[5])"
Range("D20").Select
ActiveCell.FormulaR1C1 = "=countfilesif(R[-8]C,R[-8]C[3],FALSE,R[-8]C[5])"
Range("D21").Select
ActiveCell.FormulaR1C1 = "=countfilesif(R[-8]C,R[-8]C[3],FALSE,R[-8]C[5])"
Range("D22").Select
ActiveCell.FormulaR1C1 = "=countfilesif(R[-8]C,R[-8]C[3],FALSE,R[-8]C[5])"
Range("D18").Select
' submit macro to run again in 5 min
Application.OnTime Now + TimeValue("00:05:00"), "auto_refresh"
End Sub