|
楼主 |
发表于 2009-12-30 21:02
|
显示全部楼层
Filename = Application.GetOpenFilename(Title:="选择配货清单", MultiSelect:=False)
'S_name = Split(Mid(Filename, InStrRev(Filename, "\") + 1), ".")(0)
If Filename <> False Then
'mymsg = MsgBox("导入配货数据?", vbYesNo, "提示")
Set myOBJ = GetObject(Filename)
'获取文件的SHEET页面名,供用户选择
With ComboBox1
For Each Sh In myOBJ.Worksheets
shname = Sh.Name
shindex = Sh.Index
ComboBox1.AddItem(Sh.Index, Sh.Index) = Sh.Name
'ListBox1.AddItem(Sh.Index, Sh.Index) = Sh.Name
Next
End With
UserForm1.Show
运行到上面这句的时候提示错误:
运行时错误'424'
要求对象
是什么问题啊 |
|