Set Variables To All Open Workbooks Where Name End With..

  • Hi


    I have a folder containing a number of worksheets, these worksheets are of 2 types, a customer submitted workbook and, associated with each of these, anything between 2 and 7 locally created workbooks.


    I have a macro which opens a customer workbook and all the relevant local workbooks.


    My problem is that I need to declare a variable for each of the workbooks in the form



    This code is contained within a Found files loop


    Thanks


    Robert

  • Re: Setting Variables For Unknown Number Of Workbooks


    Create an array of workbooks.


    Untested


    HTH


    Bob

  • Re: Setting Variables For Unknown Number Of Workbooks


    Brilliant, Bob. I had come to the conclusion it was better to try and work round the problem but that's neat


    Thanks


    Robert

Participate now!

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