When is "?" really a "?" (.SaveAs with Chinese chars)

N

Nick Cranham

Working with W2K English and Office 2000, but connected to network running
W2K Chinese.

Using Workbook.SaveAs FileNamePath in VBA, where FileNamePath is generated
form work sheet data. The problem arises when FileNamePath contains Chinese
characters and .SaveAs fails with "..illegal characters...".
This is true to the extent that the Chinese characters are displayed as "?",
as expected with English VB.
I can use If AscW("?")=AcsW(MyChineseChar) to strip these out, but I'm
somewhat confused as why the string functions appear to behave differently
with such characters.
e.g.
Assuming MyChineseString="???-abc" , where the ? are really Chinese chars
MyChineseChar=Left(MyChineseString,1)
Instr(1,MyChineseChar,"?")=0 <---so it's not really a "?"
But
Asc(MyChineseChar)=63 <---yes it is

As a follow up, how can I save the file with Chinese chars in the name ?

NickHK
 

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


Top