| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1407 人关注过本帖
标题:VB错误35600
只看楼主 加入收藏
leziyi
Rank: 1
等 级:新手上路
帖 子:52
专家分:0
注 册:2016-10-30
结帖率:85.71%
收藏
 问题点数:0 回复次数:2 
VB错误35600
Public Function AddListView(ListViewName As ListView, Rows As Integer, Columns As Integer, Text As String)

ListViewName.ListItems(Rows).ListSubItems(Columns).Text = Text-------------------------------------此行出错

End Function
搜索更多相关主题的帖子: VB 错误 Rows Integer Text 
2018-10-28 19:06
suzhanpeng
Rank: 4
等 级:业余侠客
威 望:7
帖 子:72
专家分:248
注 册:2016-9-28
收藏
得分:0 
Public Function AddListView(ListViewName As ListView, Rows As Integer, Columns As Integer, Text As String)

ListViewName.ListItems(Rows).SubItems(Columns) = Text-------------------------------------应该这样吧!

End Function
2018-12-16 14:39
ZHRXJR
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:125
帖 子:1034
专家分:5519
注 册:2016-5-10
收藏
得分:0 
VB错误35600 是索引超出边界,ListViewName.ListItems(Rows).ListSubItems(Columns).Text = Text
程序代码:
'修改为:
Call AddListView(ListView1, 2, 1, "abcde")     '在过程中调用自定义函数,第一个参数就是 ListView1 控件对象,第二、第三、第四都是随意设置的

Public Function AddListView(ListViewName As ListView, Rows As Integer, Columns As Integer, Text As String)    '自定义函数,定义了四个参数,调用时参数必须一一对应

    ListViewName.ListItems(Rows).ListSubItems(Columns).Text = Text    '这样这些参数均有值,才不会发生错误

End Function

调试没有问题。

请不要选我!!!
2018-12-16 22:20
快速回复:VB错误35600
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017491 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved