[tt]dim a()
p=3
q=2
r=4
'all dimensions redim only once except the last dimension
redim a(p,q,r)
wscript.echo ubound(a,1) & vbcrlf & ubound(a,2) & vbcrlf & ubound(a,3)
r=10
redim preserve a(p,q,r)
wscript.echo ubound(a,1) & vbcrlf & ubound(a,2) & vbcrlf & ubound(a,3)
on error resume next
p=5
redim preserve a(p,q,r)
if err.number<>0 then
wscript.echo hex(err.number) & vbcrlf & err.description
err.clear
end if
on error goto 0
wscript.echo ubound(a,1) & vbcrlf & ubound(a,2) & vbcrlf & ubound(a,3)[/tt]