
Xarray ended up with Subscript out of range in Asian locale
Hello ALL,
I am working on a project and I have the following code segment which works
when the language locale is set to English but when the desktop is set to
some no English locale, it ended with "subscript out of range"
I wonder if someone can help to give me some hints on what's wrong and what
do I need to do the fix the problem? It is quite urgent.
==== code begin ====
Sub InsertNewColumn()
dim X,AddNew,col
set X=document.frmworkauthorization.objXarray
set frmGrd = Document.frmWorkauthorization.grdworkauthorization
X.insert 2,0 <<<< subscript out of range when locale set to non-English
locale e.g. China PRC
Set AddNew= frmGrd.Columns.Add(0)
AddNew.Visible=True
Set Col =frmGrd.Columns.Item(0)
Col.caption ="Status"
Col.datafield="Status"
Col.Width=60
Col.HeadAlignment=2
frmGrd.rebind
End Sub
==== End ====
Thanks in advanced for any help.
Bill