From a workbook, based on the information inside, I want to find / open and update the relevant row (if exists otherwise to add a new row) in a specific folder.
in this specific folder, I want to find all the files which includes in the title for ex "AUG". In the folder, I can have different files which includes "SEP". For ex, I can have "P AND L AUG - SEP 16.XLSM" AND " P AND L - SEP - OCT 16.XLSM". In each of those files I want to update the relevant row or to create a new one if it does not exist yet
in below code
sfilter= "SEP"
SFILE = P AND L AUG - SEP 16.XLSM"
But at the line Workbooks.Open Filename:=sfile I get a message that 'P AND L AUG - SEP -16.XLSM' can not be found although it exists in the folder since sfile is found.
1. can someone tell me why I got this message error since my code correctly identify the title of the existing file.Please Login or Register to view this content.
2. as mentioned at the beginning I can have several file which includes in their title "sfile", how can I open the first file matching the condition, update it , then close it and do same to the other
the rest of my code updating the files is as follows:
thanks in advance for the tipsPlease Login or Register to view this content.
Bookmarks