vb的combobox绑定excel的一列时出错
PrivateSubForm_Load()DimXLappAsExcel.ApplicationDimXlbookAsExce.WorkbookSetXlbook=XLa...
Private Sub Form_Load()
Dim XLapp As Excel.Application
Dim Xlbook As Exce.Workbook
Set Xlbook = XLapp.Workbooks.Open("E:\abc.xls")
XLapp.Visible = False
With Xlbook.Sheets("1")
ARRDJ = .Range("B1:B1241").Value
End With
Xlbook.Close False
ComboBox1.List = ARRDJ
End Sub
报错内容“用户定义类型未定义” 展开
Dim XLapp As Excel.Application
Dim Xlbook As Exce.Workbook
Set Xlbook = XLapp.Workbooks.Open("E:\abc.xls")
XLapp.Visible = False
With Xlbook.Sheets("1")
ARRDJ = .Range("B1:B1241").Value
End With
Xlbook.Close False
ComboBox1.List = ARRDJ
End Sub
报错内容“用户定义类型未定义” 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询