File extensions

  • Thread starter Thread starter Mikeymay
  • Start date Start date
M

Mikeymay

I have a macro that when running activates a file that is
already open, this file is called 'File1'. When 'File1'
is active it is shown as 'File1.xls' but the macro is
looking for 'File1' (no extension) and cannot find it.
This is a problem that I have only had recently and all
other macro's/links have worked. I have not upgraded to a
newer version of Excel recently (currently using
Office '97 I think).

Is there a way of rectifying this without having to amend
every macro/link that I am using?
 
I don't think this is an Excel problem, unless I misunderstand you. The
file name extension is part of the file's name so, if it exists, you have to
specify it. It's possible to have a File1.xls open and an unsaved File1 open
at the same time. So obviously Excel has to distinguish between these
different workbooks.

--
Jim Rech
Excel MVP
|I have a macro that when running activates a file that is
| already open, this file is called 'File1'. When 'File1'
| is active it is shown as 'File1.xls' but the macro is
| looking for 'File1' (no extension) and cannot find it.
| This is a problem that I have only had recently and all
| other macro's/links have worked. I have not upgraded to a
| newer version of Excel recently (currently using
| Office '97 I think).
|
| Is there a way of rectifying this without having to amend
| every macro/link that I am using?
 
If I have specified a file to activate within the code I
would have called this file 'File1' for example, now when
I run the macro I have to change the file name within the
code to 'File1.xls' or it can't find it. It seemed to run
OK for months now suddenly it doesn't work unless I add
the extension to all filenames within the code.
 
It seemed to run OK for months now suddenly it doesn't work

Well, something changed. Anyway, if you post the key code maybe we can get
it working again.

--
Jim Rech
Excel MVP
| If I have specified a file to activate within the code I
| would have called this file 'File1' for example, now when
| I run the macro I have to change the file name within the
| code to 'File1.xls' or it can't find it. It seemed to run
| OK for months now suddenly it doesn't work unless I add
| the extension to all filenames within the code.
|
|
| >-----Original Message-----
| >I don't think this is an Excel problem, unless I
| misunderstand you. The
| >file name extension is part of the file's name so, if it
| exists, you have to
| >specify it. It's possible to have a File1.xls open and an
| unsaved File1 open
| >at the same time. So obviously Excel has to distinguish
| between these
| >different workbooks.
| >
| >--
| >Jim Rech
| >Excel MVP
| message
| >| >|I have a macro that when running activates a file that is
| >| already open, this file is called 'File1'. When 'File1'
| >| is active it is shown as 'File1.xls' but the macro is
| >| looking for 'File1' (no extension) and cannot find it.
| >| This is a problem that I have only had recently and all
| >| other macro's/links have worked. I have not upgraded
| to a
| >| newer version of Excel recently (currently using
| >| Office '97 I think).
| >|
| >| Is there a way of rectifying this without having to
| amend
| >| every macro/link that I am using?
| >
| >
| >.
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top