Thanks for reporting this, and apologies for the bug.
I think the best way to overcome this is to avoid step (iii) on the targeted sheet. This was an old function to extract all EICs from LCMS data, but I think few people were using it and now the 'Extractmasschromatograms' function is not supported by mzmatch.R.
The reason is because it is better to use xcms to extract peaks from you LC-MS data. You can do this using the standard functions (steps a-d) on the Settings page. Those functions will produce a txt file of all peaks which can be used as the input for step (iv) on the Targeted sheet.
Let me know how this goes.
Note: the actual error you found in Excel can be fixed by deleting the words 'option explicit' from the very top of that VBA module - but this will only get you into R before it crashes again due to the reasons above. You may wish to do this if you're trying to extract peak lists from an existing peakML file, but in general its best to use the functions on the 'settings' page to generate .txt peak lists.
all the best,