下标超出范围的解决方案 [英] solution for subscript out of range

查看:470
本文介绍了下标超出范围的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 MSHFlexGrid1.Rows = MSHFlexGrid1.Rows +  1 
MSHFlexGrid1.TextMatrix( 0  0 )=修剪(cboAccId.Text)
MSHFlexGrid1.TextMatrix( 0  1 )=修剪(cboAccName.Text)
MSHFlexGrid1.TextMatrix( 0  2 )=修剪(txtCost.Text)




发生第四行错误
下标超出范围的解决方案

解决方案

这是什么意思?在没有提供有关程序,其数据和发生错误的代码行的一些基本详细信息的情况下,您如何期望任何人都能猜测导致问题的原因?帮自己一个忙,看一下代码,找出下标值是什么,以及下标值对于要寻址的数组而言太大还是太小.


MSHFlexGrid1.Rows = MSHFlexGrid1.Rows + 1 MSHFlexGrid1.TextMatrix(0, 0) = Trim(cboAccId.Text) MSHFlexGrid1.TextMatrix(0, 1) = Trim(cboAccName.Text) MSHFlexGrid1.TextMatrix(0, 2) = Trim(txtCost.Text)




for 4th line error occured
solution for subscript out of range

解决方案

What does this mean? How do you expect anyone to guess what is causing the problem without providing some basic detail about your program, its data and the line of code that the error occurred on? Do yourself a favour and look at your code and figure out what the subscript value is and whether it is too large or too small for the array it is addressing.


This[^] should help you out.


这篇关于下标超出范围的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆