I need to create a macro to get values from another workbook's cell. Like below
Cells(1,1).value= "='C:\January\[workbookname.xls]Sheet1'!A1"
but when the next month comes I need to need to change the "January" part to "February" without changing the macro. Ideally, That part should be a variable.
I tried below code, But it won't work. Any help
Cells(1,1).value= "='C:\ & Worksheets("Months").Range("A2").Value & \[workbookname.xls]Sheet1'!A1"
Months sheet contains the names of months.
Bookmarks