Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88854

Referencing a workbook whose file name changes consistently - solution suggestions?

$
0
0

New to VBA here. At work I am creating a macro that can compile and format data from a report we get monthly and the file name changes. Since the name changes, instead of having to go into VBE and changing the name from there, is there a user form I might be able to create that allows me to type in the name of the workbook and it will be able to insert it into the script?

For instance when I reference:

Workbooks("Book1.xls").Worksheets("Sheet1").Range("A1")

The workbook name will change month to month.

Alternative solutions are welcomed

Thanks all


Viewing all articles
Browse latest Browse all 88854


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>