Files opening with a number appended

  • Thread starter Thread starter Rich May
  • Start date Start date
R

Rich May

Hi all,

Hope you can help. I have a Macro in an excel file that looks for and
opens another named excel file based on some variables. For example a
new spreadsheet is opened today called 100305 (based on the date), the
macro will then look for a file from the previous week (030305), open
it, look for a certain value and copy it into the new sheet.

However from time to time I'm finding that when the macro opens the
previous file it appends a '1' to the end of the name (eg 0303051) and
therefore my macro fails as it can't reference the file properly in
order to find the required value.

I can't find any reason why Excel is adding the 1 to the end and any
help would be much appreciated.

Cheers

Rich May
 
When you see that additional 1, do you see an extension (.xls), too?

It sounds like the workbook is being opened as a template. (Kind of like when
you see book1, book2, book3, when you create new workbooks.)
 
Back
Top