savindrasingh
Board Regular
- Joined
- Sep 10, 2009
- Messages
- 183
Hello Experts,
I have below code in one of my macro projects:
This will prompt the user to open one workbook which is required for executing a macro. When this file open dialog box appears on screen it is displaying 4-5 different filenames in default folder under which this dialogbox is displayed.
My requirement is it should display only filename starting with 20*.xlsx because the file I want the user should open is in YYYY-MM-DD.xlsx format and it can be any date from this week ex. 2010-04-27.xlsx.
This way I can prevent user from selecting a wrong file to be opened.
Is that possible to apply this kind of filter?
I have below code in one of my macro projects:
Code:
RunBookCrtF = Application.GetOpenFilename("Runbook file in YYYY-MM-DD format (*.xlsx),*.xlsx", 1, "Select latest date Runbook Critical Fields Report file")
This will prompt the user to open one workbook which is required for executing a macro. When this file open dialog box appears on screen it is displaying 4-5 different filenames in default folder under which this dialogbox is displayed.
My requirement is it should display only filename starting with 20*.xlsx because the file I want the user should open is in YYYY-MM-DD.xlsx format and it can be any date from this week ex. 2010-04-27.xlsx.
This way I can prevent user from selecting a wrong file to be opened.
Is that possible to apply this kind of filter?