Notification of a new file in a folder?

MOB

Well-known Member
Joined
Oct 18, 2005
Messages
1,055
Office Version
  1. 365
Platform
  1. Windows
Hi

I have a summary spreadsheet that links to all the spreadsheets in a certain folder to summarise the data.

Is there any way for excel to notify if there are any new files in that folder that dont appear on the summary spreadsheet? ie if someone has created a new file.

At the moment I have to periodically check the folder for new files and add if necessary.

Thanks
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
if you are wanting to be notified automatically as the file is being added to the folder , I think it is going to be difficult. I still remember trying to do this but failed.

Otherwise, you could for example save the file names in the registry upon closing the workbook so you can subsequently retrieve and check them when you reopen the workbook in a different session.

Regards.
 
Upvote 0
Thanks for that link - I'm not an IT person so I'm going to get some assistance with this - but it looks like its what I need.
 
Upvote 0
Hi,

this would be my contribution
Code:
Option Explicit

Sub check_for_new_files()
'Erik Van Geit
'060922
'Current list in column 1, path + filetype in first cell
'examples:
'C:\windows\desktop\*.*
'C:\windows\desktop\*.txt
'C:\windows\desktop\*name*.xls
'C:\windows\desktop\name.*
'All found files which are not in column 1, will be listed in column 2

Dim file_name As String
Dim foundName As Range

'**** EDIT ****
Const FilesCol = 1
Const NewFilesCol = 2
'**** END EDIT ****

'Cells(1, FilesCol) has Path
file_name = Dir(Cells(1, FilesCol))

    Do Until file_name = ""
    Set foundName = Nothing
    Set foundName = Columns(FilesCol).Find(what:=file_name, LookIn:=xlValues, lookat:=xlWhole, MatchCase:=vbNo)
        If foundName Is Nothing Then
        Cells(Rows.Count, NewFilesCol).End(xlUp)(2) = file_name
        End If
    file_name = Dir
    Loop

End Sub
  A                         B                            
1 C:\bus\window\new*.txt                                 
2 new instance of Excel.txt newwindow for each sheet.txt 
3 newwindow.txt                                          

filelist

[Table-It] version 06 by Erik Van Geit

kind regards,
Erik
 
Upvote 0
If you can explain a bit more on what you are doing I may be able to modify it for you.

I have a folder S:\finance which contains say 10 spreadsheets

I need to know somehow when any of these spreadsheets are deleted, or if new spreadsheets are added.

Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,028
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top