idx = CInt(max.Substring(9,3)) + 1 '获得最大过磅编号的后三位顺序号,并加1
改成
idx = CInt(max.Substring(bh.length+1,3)) + 1 '获得最大过磅编号的后三位顺序号,并加1