I
iop
in Excel VBA macro, I found:
here is a file named "abc[def]gh.xls" in folder_A,
1. Code1:
for each objFile in folder_A.files
when objFile refers to this file, its Name property objFile.Name =
"abc[def]gh.xls", which is correct.
2. Code2:(if we open this file, its name changes.)
set objFile = application.open(objFile)
when objFile refers to this file, after running this code, objFile.Name =
"abc(def)gh.xls", here, "[" and "]" have changed to "(" and ")".
I've check it in both excel 2003 and 2007, the same result.
Is this a bug? or on some intended purpose?
thanks!
here is a file named "abc[def]gh.xls" in folder_A,
1. Code1:
for each objFile in folder_A.files
when objFile refers to this file, its Name property objFile.Name =
"abc[def]gh.xls", which is correct.
2. Code2:(if we open this file, its name changes.)
set objFile = application.open(objFile)
when objFile refers to this file, after running this code, objFile.Name =
"abc(def)gh.xls", here, "[" and "]" have changed to "(" and ")".
I've check it in both excel 2003 and 2007, the same result.
Is this a bug? or on some intended purpose?
thanks!