Let's say I have the following files (one for each week in a year):
- test 01.xlsm
- test 02.xlsm
- test .....xlsm
- test 52.xlsm
I want to be able to choose the file I'd like to open with a prompt.
So instead of this function ...
Workbooks.Open Filename:= _
"F:\mydocs\test11.xlsm"
... I need something that lets me enter the number myself (so in this case "11" or whatever value between 01 and 52 depending on the week I want to see the results for).
Is this possible? :s
You should use an
InputBox
:weekNum = InputBox("Input week number:")
Why not use the file picker?
This way you can just choose the file.
Perhaps: