J
jaques
Yesterday, I was working on my fiscal year end (FYE). My books are kept
in Excel. In various extract sheets, I have to change links from the
last FYE GL to the new FYE GL. I made a VBA macro which used the
Workbook method 'changelinks'.
Inexplicably, with perfectly good path names, it would declare that the
external reference was invalid.
I finally found a REPRODUCIBLE ERROR. If I put single quotes inside the
double quotes, then it will bring up a dialog to ask where the file is.
If I cancel that, then it will work on the next attempt.
I tried relaunching XL. No luck. I tried using the ChDir command just
before the changelinks command. It worked once, but not again. It's
so weird! The other link changing stuff I do works fine! I even tried a
dummy file to link to, in case the presence of multiple worksheets in
the new target was breaking it.
That led to the answer. Even though the old links only show the file in
the link dialog, they were being used in connection with a specific
sheet name, which didn't exist in the new target. If I did a S&R, I
cld change it. However, a partial S&R, of just the sheet name, so I cld
then change the link, would just grind for a while then do nothing. You
must S&R for both the file and the sheet concurrently.
Actually, trying to record the macro led to the answer. I went through
the normal steps, but then got the stupid error message that the
external reference was invalid.
Again, I found no spot on the MS site for bug reports, so I post here,
in the hopes it is monitored and that Excel X is being supported.
in Excel. In various extract sheets, I have to change links from the
last FYE GL to the new FYE GL. I made a VBA macro which used the
Workbook method 'changelinks'.
Inexplicably, with perfectly good path names, it would declare that the
external reference was invalid.
I finally found a REPRODUCIBLE ERROR. If I put single quotes inside the
double quotes, then it will bring up a dialog to ask where the file is.
If I cancel that, then it will work on the next attempt.
I tried relaunching XL. No luck. I tried using the ChDir command just
before the changelinks command. It worked once, but not again. It's
so weird! The other link changing stuff I do works fine! I even tried a
dummy file to link to, in case the presence of multiple worksheets in
the new target was breaking it.
That led to the answer. Even though the old links only show the file in
the link dialog, they were being used in connection with a specific
sheet name, which didn't exist in the new target. If I did a S&R, I
cld change it. However, a partial S&R, of just the sheet name, so I cld
then change the link, would just grind for a while then do nothing. You
must S&R for both the file and the sheet concurrently.
Actually, trying to record the macro led to the answer. I went through
the normal steps, but then got the stupid error message that the
external reference was invalid.
Again, I found no spot on the MS site for bug reports, so I post here,
in the hopes it is monitored and that Excel X is being supported.