VB用户定义类型未定义问题请教!
请教这段代码,为什么出错!PrivateSubUserForm_Initialize()DimiDimITMAslistItem,listListview1.Column...
请教这段代码,为什么出错!
Private Sub UserForm_Initialize()Dim iDim ITM As listItem, listListview1.ColumnHeaders.Add 1, "G", "工号", Listview1.Width / 6 '第1列Listview1.ColumnHeaders.Add 2, "X", "姓名", Listview1.Width / 6, lvwColumnCenter '第2列Listview1.ColumnHeaders.Add 3, "B", "部门", Listview1.Width / 6, lvwColumnRight '第3列Listview1.ColumnHeaders.Add 4, "Z", "职位", Listview1.Width / 6 '第4列Listview1.ColumnHeaders.Add 5, "J", "家庭", Listview1.Width / 6 '第5列Listview1.ColumnHeaders.Add 6, "ZJ", "证件号", Listview1.Width / 6 '第6列Listview1.View = lvwReportListview1.Gridlines = TrueFor i = 4 To [A65536].End(xlUp).RowSet ITM = Listview1.ListItems.Add()ITM.Text = Cells(i, 2)ITM.SubItems(1) = Cells(i, 3)ITM.SubItems(2) = Cells(i, 4)ITM.SubItems(3) = Cells(i, 5)ITM.SubItems(4) = Cells(i, 6)ITM.SubItems(5) = Cells(i, 7)Next iEnd Sub 展开
Private Sub UserForm_Initialize()Dim iDim ITM As listItem, listListview1.ColumnHeaders.Add 1, "G", "工号", Listview1.Width / 6 '第1列Listview1.ColumnHeaders.Add 2, "X", "姓名", Listview1.Width / 6, lvwColumnCenter '第2列Listview1.ColumnHeaders.Add 3, "B", "部门", Listview1.Width / 6, lvwColumnRight '第3列Listview1.ColumnHeaders.Add 4, "Z", "职位", Listview1.Width / 6 '第4列Listview1.ColumnHeaders.Add 5, "J", "家庭", Listview1.Width / 6 '第5列Listview1.ColumnHeaders.Add 6, "ZJ", "证件号", Listview1.Width / 6 '第6列Listview1.View = lvwReportListview1.Gridlines = TrueFor i = 4 To [A65536].End(xlUp).RowSet ITM = Listview1.ListItems.Add()ITM.Text = Cells(i, 2)ITM.SubItems(1) = Cells(i, 3)ITM.SubItems(2) = Cells(i, 4)ITM.SubItems(3) = Cells(i, 5)ITM.SubItems(4) = Cells(i, 6)ITM.SubItems(5) = Cells(i, 7)Next iEnd Sub 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询