I'm currently having an issue when trying to define a range in VBA.
The way the code works is that it prompts a user to select two files. These are a full list of products and then a descriptions file (which should populate the full list with relevant descriptions)
The code which I can't get past at the moment is:
ActiveCell.Formula = "=VLOOKUP (C[-1], '[" + Descriptions_file + "]" + Descriptions_sheet + "'!R1:R1048576,4,FALSE)"
Sorry if this seems simple, I'm a complete novice!
The range I would like to select in the Descriptions_sheet is the whole sheet. Though I have to keep this sheet name generic as there are multiple sheets in the workbook.
Cheers.
The way the code works is that it prompts a user to select two files. These are a full list of products and then a descriptions file (which should populate the full list with relevant descriptions)
The code which I can't get past at the moment is:
ActiveCell.Formula = "=VLOOKUP (C[-1], '[" + Descriptions_file + "]" + Descriptions_sheet + "'!R1:R1048576,4,FALSE)"
Sorry if this seems simple, I'm a complete novice!
The range I would like to select in the Descriptions_sheet is the whole sheet. Though I have to keep this sheet name generic as there are multiple sheets in the workbook.
Cheers.