i found a macro where it counts the # of files in a specified directory.
Problem is, when I add/delete files in the directories, the true # isn't reflected in excel unless I double click & enter on the cell containing the formula.
I recorded a macro, titled refresh, that does this for cells D19 - D23.
Is there a way where I can get the refresh macro to just run every X minutes instead of me having to click it every time?
Problem is, when I add/delete files in the directories, the true # isn't reflected in excel unless I double click & enter on the cell containing the formula.
I recorded a macro, titled refresh, that does this for cells D19 - D23.
Is there a way where I can get the refresh macro to just run every X minutes instead of me having to click it every time?
Code:
Sub refresh_files()
'
' refresh_files Macro
'
'
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("D23").Select
ActiveCell.FormulaR1C1 = "=countfilesif(R[-8]C,R[-8]C[3],FALSE,R[-8]C[5])"
Range("D19").Select
End Sub