Refer to workbook by beginning of filename (as end changes)

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • Every day I run a macro.


    Every day the macro leaves open a source file (it copies info into a new workbook).


    I can't reliably close the source file within the Macro because the source file has a naming format like


    VendorBacklog4343242343 (the numbers aren't a date or anything I can predict). Today's was 82435386 - which I hoped might be Unix time, but this is 1972 in Unix time.


    Anyway I can refer to the file as "filebeginning(VendorBacklog).close" or some such?


    THANKS

  • Re: Refer to workbook by beginning of filename (as end changes)


    Assuming you mean an Excel workbook is left open...


    You can iterate all the open workbooks looking for a partial title. If you find it, you can set a workbook type variable to point at the workbook and then do what you want...



    (Typed freehand - untested)


    If you meant another type of window, then please elaborate...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!