【发布时间】:2018-10-17 00:06:20
【问题描述】:
我正在尝试用另一个工作簿中的动态范围填充 ActiveX 组合框,但在分配范围的代码行上出现运行时错误“1004”应用程序或对象定义错误:
Dim prfile1 As String
Dim prfile2 As String
Dim filepath As String
Dim checktotal As Integer
Dim checkrng As Range
Dim emunber As String
prfile1 = Worksheets("setup").Range("B10").Value
prfile2 = Worksheets("setup").Range("B7").Value
filepath = Worksheets("setup").Range("e10").Value
emunber = Worksheets("ReprintOld").Range("V3").Value
Workbooks.Open filepath & prfile2
Windows(prfile2).Activate
checktotal = Workbooks(prfile2).Worksheets(emunber).Range("AE1")
checkrng = Workbooks(prfile2).Worksheets(emunber).Range(Range("U5"), Range("U5").End(xlDown))
【问题讨论】:
标签: excel vba debugging combobox